浏览代码

Update PBRLighting.frag

Ryan McDonough 9 月之前
父节点
当前提交
5b8a88b6bf
共有 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

@@ -218,7 +218,7 @@ void main(){
         vec3 fZero = specularColor.xyz;
     #else
         float nonMetalSpec = 0.08; //nonMetalSpec is always constant value of 0.8 in metallic workflow
-        specularColor = (nonMetalSpec - nonMetalSpec * Metallic) + albedo * Metallic;
+        vec4 specularColor = (nonMetalSpec - nonMetalSpec * Metallic) + albedo * Metallic;
         vec4 diffuseColor = albedo - albedo * Metallic;
         vec3 fZero = vec3(0.04); 
         fZero = mix(fZero, albedo.rgb, Metallic);