File tree Expand file tree Collapse file tree
packages/shaderlab/src/shaders/shadingPBR Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -345,8 +345,8 @@ vec3 BRDF_Diffuse_Lambert(vec3 diffuseColor) {
345345 }
346346
347347 float prefilteredDFG(float NoV, float perceptualRoughness) {
348- return textureLod( material_SheenLUT, vec2 (NoV, perceptualRoughness), 0.0 ).b;
349- }
348+ return textureLod(material_SheenLUT, vec2 (NoV, perceptualRoughness), 0.0 ).b;
349+ }
350350#endif
351351
352352// ------------------------Indirect Specular------------------------
@@ -398,8 +398,7 @@ void initBRDFData(SurfaceData surfaceData, out BRDFData brdfData){
398398
399399 #ifdef MATERIAL_ENABLE_SHEEN
400400 brdfData.sheenRoughness = max (MIN_PERCEPTUAL_ROUGHNESS, min (surfaceData.sheenRoughness + getAARoughnessFactor(surfaceData.normal), 1.0 ));
401- float perceptualRoughness = brdfData.sheenRoughness * brdfData.sheenRoughness;
402- brdfData.approxIBLSheenDG = prefilteredDFG(surfaceData.dotNV, perceptualRoughness);
401+ brdfData.approxIBLSheenDG = prefilteredDFG(surfaceData.dotNV, brdfData.sheenRoughness);
403402 brdfData.sheenScaling = 1.0 - brdfData.approxIBLSheenDG * max (max (surfaceData.sheenColor.r, surfaceData.sheenColor.g), surfaceData.sheenColor.b);
404403 #endif
405404}
You can’t perform that action at this time.
0 commit comments