metalnessmapFragment top-level property

String metalnessmapFragment
getter/setter pair

Implementation

String metalnessmapFragment = """
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
""";