瀏覽代碼

PBRLighting Uses the world normal fetched from the texture...

Nehon 9 年之前
父節點
當前提交
7190da4df0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.frag

+ 1 - 1
jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.frag

@@ -214,7 +214,7 @@ void main(){
 
     vec3 indirectDiffuse = vec3(0.0);
     vec3 indirectSpecular = vec3(0.0);    
-    indirectDiffuse = textureCube(g_IrradianceMap, wNormal.xyz).rgb * diffuseColor.rgb;
+    indirectDiffuse = textureCube(g_IrradianceMap, normal.xyz).rgb * diffuseColor.rgb;
 
     indirectSpecular = ApproximateSpecularIBLPolynomial(g_PrefEnvMap, specularColor.rgb, Roughness, ndotv, rv.xyz);
     indirectSpecular *= vec3(horiz);