浏览代码

Merge pull request #8120 from MackeyK24/master

RGBD Lightmap Fix
David Catuhe 5 年之前
父节点
当前提交
0d93faba28
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Shaders/default.fragment.fx

+ 2 - 1
src/Shaders/default.fragment.fx

@@ -254,10 +254,11 @@ void main(void) {
 	float shadow = 1.;
 
 #ifdef LIGHTMAP
-	vec3 lightmapColor = texture2D(lightmapSampler, vLightmapUV + uvOffset).rgb * vLightmapInfos.y;
+	vec3 lightmapColor = texture2D(lightmapSampler, vLightmapUV + uvOffset).rgb;
     #ifdef RGBDLIGHTMAP
         lightmapColor.rgb = fromRGBD(lightmapColor);
     #endif
+	lightmapColor.rgb *= vLightmapInfos.y
 #endif
 
 #include<lightFragment>[0..maxSimultaneousLights]