File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
jme3-core/src/main/resources/Common/MatDefs/Light Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1919uniform vec4 g_LightData[NB_LIGHTS];
2020uniform vec3 g_CameraPosition;
2121
22+ #ifdef USE_FOG
23+ #import "MatDefs/ ShaderLib/ MaterialFog.glsllib"
24+ #endif
25+
2226void main(){
2327 vec3 wpos = PBRLightingUtils_getWorldPosition();
2428 vec3 worldViewDir = normalize (g_CameraPosition - wpos);
@@ -54,6 +58,10 @@ void main(){
5458 gl_FragColor .rgb += surface.envLightContribution;
5559 gl_FragColor .rgb += surface.emission;
5660 gl_FragColor .a = surface.alpha;
61+
62+ #ifdef USE_FOG
63+ gl_FragColor = MaterialFog_calculateFogColor(vec4 (gl_FragColor ));
64+ #endif
5765
5866 // outputs the final value of the selected layer as a color for debug purposes.
5967 #ifdef DEBUG_VALUES_MODE
You can’t perform that action at this time.
0 commit comments