Created
June 4, 2018 11:43
-
-
Save peted70/56e380c07b42e127a01cbb1280fb4bb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef HAS_METALROUGHNESSMAP | |
// Roughness is stored in the 'g' channel, metallic is stored in the 'b' channel. | |
// This layout intentionally reserves the 'r' channel for (optional) occlusion map data | |
float4 mrSample = metallicRoughnessTexture.Sample(metallicRoughnessSampler, input.texcoord); | |
perceptualRoughness = mrSample.g * perceptualRoughness; | |
metallic = mrSample.b * metallic; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment