Skip to content

Commit 723df1f

Browse files
Change channels for Metallic Roughness maps
1 parent 00042f6 commit 723df1f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

screenshots/Renderman_swatch.png

63.1 KB
Loading

src/shaders/common/pathtrace.glsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,13 @@ void GetMaterialsAndTextures(inout State state, in Ray r)
107107
{
108108
vec2 matRgh;
109109
// TODO: Change metallic roughness maps in repo to linear space and remove gamma correction
110-
matRgh = pow(texture(textureMapsArrayTex, vec3(texUV, int(mat.texIDs.y))).zy, vec2(2.2));
110+
matRgh = pow(texture(textureMapsArrayTex, vec3(texUV, int(mat.texIDs.y))).xy, vec2(2.2));
111111
mat.metallic = matRgh.x;
112112
mat.roughness = max(matRgh.y, 0.001);
113113
}
114114

115115
// Normal Map
116+
// FIXME: Output when using a normal map doesn't match up with Cycles (Blender) output
116117
if (int(mat.texIDs.z) >= 0)
117118
{
118119
vec3 nrm = texture(textureMapsArrayTex, vec3(texUV, int(mat.texIDs.z))).xyz;

0 commit comments

Comments
 (0)