소스 검색

Fixed roughness fetch in the spec / gloss pipeline
See issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/281

Nehon 10 년 전
부모
커밋
4342d97439
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

@@ -167,7 +167,7 @@ void main(){
     #ifdef SPECGLOSSPIPELINE
           vec4 specularColor = texture2D(m_SpecularMap, newTexCoord);
           vec4 diffuseColor = albedo;
-          Roughness = 1.0 - texture2D(m_GlossMap, newTexCoord);          
+          Roughness = 1.0 - texture2D(m_GlossMap, newTexCoord).r;          
     #else      
         float nonMetalSpec = 0.08 * specular;
         vec4 specularColor = (nonMetalSpec - nonMetalSpec * Metallic) + albedo * Metallic;