Fixed roughness fetch in the spec / gloss pipeline

See issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/281
This commit is contained in:
Nehon 2015-07-02 21:00:07 +02:00
parent af35f27b93
commit 4342d97439

View File

@ -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;