fireball/lib/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl
2018-12-25 17:29:22 +03:30

11 lines
252 B
GLSL

float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vUv );
// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture
metalnessFactor *= texelMetalness.b;
#endif