Updated the Tank maps, (SP2 generates smaller maps) also reverted last calibration changes as it was screwing up the real life models...
This commit is contained in:
parent
e2f180811c
commit
da9d38fee6
jme3-core/src/main
jme3-examples/src/main/java/jme3test/light/pbr
jme3-testdata/src/main/resources/Models/Tank
@ -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 ![]() (image error) Size: 4.0 MiB After ![]() (image error) Size: 3.7 MiB ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 90 KiB After ![]() (image error) Size: 89 KiB ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 3.0 MiB After ![]() (image error) Size: 1.4 MiB ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 18 MiB After ![]() (image error) Size: 12 MiB ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 2.8 MiB After ![]() (image error) Size: 1.7 MiB ![]() ![]() |
Loading…
x
Reference in New Issue
Block a user