The colors in VR are different from the colors in “regular” mode. In VR, all colors seems brighter, and the shadows are darker.
Below : VR View :
Below : Regular view (FPS, or non-vr) of the same scene with the sun in approx. the same position
For example, the sky color. It’s hardcoded, for now, in a fragment shader like so
31.0f/255.0f,100.0f/255.0f,179.0f/255.0f
So for the Sky, with a color picker tool (photoshop), we can see that the VR view has the closest color.
For the ground, it’s defined in java like so new Color(97, 213, 54)
. Again, the VR has the closest color.
The ground material is defined like so :
// in our case ambientColor is "new Color(97, 213, 54)" ; it's passed as an argument
Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
mat.setBoolean("UseMaterialColors", true);
mat.setColor("Ambient", ambientColor);
mat.setColor("Specular", ColorRGBA.White);
mat.setColor("Diffuse", ambientColor);
mat.setFloat("Shininess", 128.0f);
And there are two lights :
sunLight = new DirectionalLight();
sunLight.setColor(ColorRGBA.White);
sunLight.setDirection(new Vector3f(-.5f, -.5f, -.5f).normalizeLocal());
AmbientLight ambientLight = new AmbientLight();
ambientLight.setColor(ColorRGBA.White.mult(0.1f));
Both VR and non-VR render the same scene, of course.
So … I wonder which view renders the colors correctly. And also, except shaders/materials/lighting, I don’t have a slightest clue what in my code could affect the colors in such a way.