File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
jme3-core/src/main/resources/Common/MatDefs/Light Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ void main(){
195195 vec4 diffuseColor = albedo - albedo * Metallic;
196196 #endif
197197
198+ gl_FragColor .rgb = vec3 (0.0 );
199+
198200 #ifdef LIGHTMAP
199201 vec3 lightMapColor;
200202 #ifdef SEPARATE_TEXCOORD
@@ -204,12 +206,14 @@ void main(){
204206 #endif
205207 #ifdef AO_MAP
206208 lightMapColor.gb = lightMapColor.rr;
209+ diffuseColor.rgb *= lightMapColor;
210+ #else
211+ gl_FragColor .rgb += diffuseColor.rgb * lightMapColor;
207212 #endif
208213 specularColor.rgb *= lightMapColor;
209- albedo.rgb *= lightMapColor;
210214 #endif
211215
212- gl_FragColor .rgb = vec3 ( 0.0 );
216+
213217 float ndotv = max ( dot ( normal, viewDir ),0.0 );
214218 for ( int i = 0 ;i < NB_LIGHTS; i+= 3 ){
215219 vec4 lightColor = g_LightData[i];
You can’t perform that action at this time.
0 commit comments