Updated the Tank maps, (SP2 generates smaller maps) also reverted last calibration changes as it was screwing up the real life models...

define_list_fix
Nehon 9 years ago
parent e2f180811c
commit da9d38fee6
  1. 2
      jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java
  2. 2
      jme3-core/src/main/resources/Common/ShaderLib/PBR.glsllib
  3. 6
      jme3-examples/src/main/java/jme3test/light/pbr/TestPBRLighting.java
  4. BIN
      jme3-testdata/src/main/resources/Models/Tank/Tank_Base_Color.png
  5. BIN
      jme3-testdata/src/main/resources/Models/Tank/Tank_Emissive.png
  6. BIN
      jme3-testdata/src/main/resources/Models/Tank/Tank_Metallic.png
  7. BIN
      jme3-testdata/src/main/resources/Models/Tank/Tank_Normal.png
  8. BIN
      jme3-testdata/src/main/resources/Models/Tank/Tank_Roughness.png

@ -433,7 +433,7 @@ public class EnvMapUtils {
public static float getRoughnessFromMip(int miplevel, int miptot) {
float mipScale = 1.0f;
float mipOffset = -0.5f;
float mipOffset = -0.3f;
return pow(2, (miplevel - (miptot - 1) + mipOffset) / mipScale);
}

@ -143,7 +143,7 @@ vec3 ApproximateSpecularIBL(samplerCube envMap,sampler2D integrateBRDF, vec3 Spe
vec3 ApproximateSpecularIBLPolynomial(samplerCube envMap, vec3 SpecularColor , float Roughness, float ndotv, vec3 refVec){
//TODO magic values should be replaced by defines.
float Lod = log2(Roughness) * 1.1 + 6.0 - 2.0;
float Lod = log2(Roughness) * 1.5 + 6.0 - 1.0;
vec3 PrefilteredColor = textureCubeLod(envMap, refVec.xyz, Lod).rgb;
return PrefilteredColor * EnvDFGPolynomial(SpecularColor, Roughness, ndotv);
}

@ -57,6 +57,7 @@ import com.jme3.scene.Spatial;
import com.jme3.texture.plugins.ktx.KTXLoader;
import com.jme3.util.MaterialDebugAppState;
import com.jme3.util.SkyFactory;
import com.jme3.util.mikktspace.MikktspaceTangentGenerator;
/**
* A test case for PBR lighting.
@ -83,6 +84,7 @@ public class TestPBRLighting extends SimpleApplication {
viewPort.setBackgroundColor(ColorRGBA.White);
modelNode = (Node) new Node("modelNode");
model = (Geometry) assetManager.loadModel("Models/Tank/tank.j3o");
//MikktspaceTangentGenerator.generate(model);
modelNode.attachChild(model);
dl = new DirectionalLight();
@ -93,9 +95,9 @@ public class TestPBRLighting extends SimpleApplication {
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
fpp.addFilter(new FXAAFilter());
// fpp.addFilter(new FXAAFilter());
fpp.addFilter(new ToneMapFilter(Vector3f.UNIT_XYZ.mult(4.0f)));
fpp.addFilter(new SSAOFilter(0.5f, 3, 0.2f, 0.2f));
// fpp.addFilter(new SSAOFilter(0.5f, 3, 0.2f, 0.2f));
viewPort.addProcessor(fpp);
//Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Sky_Cloudy.hdr", SkyFactory.EnvMapType.EquirectMap);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 MiB

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Loading…
Cancel
Save