git.s-ol.nu ~forks/DiligentFX / 1129caa
Fixed a couple of minor shader warnings assiduous 1 year, 1 month ago
4 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
6262 {
6363 float3 R = normalize(WorldPos);
6464 Color.rgb = PrefilterEnvMap(g_Roughness, R);
65 Color.a = 0.0;
6566 }
4747 {
4848 #ifdef GLTF_PBR_MANUAL_SRGB
4949 # ifdef SRGB_FAST_APPROXIMATION
50 float3 linOut = pow(srgbIn.xyz, float3(2.2, 2.2, 2.2));
50 float3 linOut = pow(saturate(srgbIn.xyz), float3(2.2, 2.2, 2.2));
5151 # else
5252 float3 bLess = step(float3(0.04045, 0.04045, 0.04045), srgbIn.xyz);
53 float3 linOut = mix( srgbIn.xyz/12.92, pow((srgbIn.xyz + float3(0.055, 0.055, 0.055)) / 1.055, float3(2.4, 2.4, 2.4)), bLess );
53 float3 linOut = mix( srgbIn.xyz/12.92, pow(saturate((srgbIn.xyz + float3(0.055, 0.055, 0.055)) / 1.055), float3(2.4, 2.4, 2.4)), bLess );
5454 # endif
5555 return linOut;
5656 #else
4747 "{\n"
4848 "#ifdef GLTF_PBR_MANUAL_SRGB\n"
4949 "# ifdef SRGB_FAST_APPROXIMATION\n"
50 " float3 linOut = pow(srgbIn.xyz, float3(2.2, 2.2, 2.2));\n"
50 " float3 linOut = pow(saturate(srgbIn.xyz), float3(2.2, 2.2, 2.2));\n"
5151 "# else\n"
5252 " float3 bLess = step(float3(0.04045, 0.04045, 0.04045), srgbIn.xyz);\n"
53 " float3 linOut = mix( srgbIn.xyz/12.92, pow((srgbIn.xyz + float3(0.055, 0.055, 0.055)) / 1.055, float3(2.4, 2.4, 2.4)), bLess );\n"
53 " float3 linOut = mix( srgbIn.xyz/12.92, pow(saturate((srgbIn.xyz + float3(0.055, 0.055, 0.055)) / 1.055), float3(2.4, 2.4, 2.4)), bLess );\n"
5454 "# endif\n"
5555 " return linOut;\n"
5656 "#else\n"
6262 "{ \n"
6363 " float3 R = normalize(WorldPos);\n"
6464 " Color.rgb = PrefilterEnvMap(g_Roughness, R);\n"
65 " Color.a = 0.0;\n"
6566 "}\n"