Closed tigrazone closed 1 week ago
If it is srgb2linear approximation is better to use
// sRGB to linear approximation, see http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html
vec4 srgbToLinear(in vec4 sRgb)
{
//return vec4(pow(sRgb.xyz, vec3(2.2f)), sRgb.w);
vec3 rgb = sRgb.xyz * (sRgb.xyz * (sRgb.xyz * 0.305306011F + 0.682171111F) + 0.012522878F);
return vec4(rgb, sRgb.a);
}
make a pr, plz 😄
Ok
https://github.com/gameknife/gkNextRenderer/blob/cbbfc8dfb4c2ef040903dd37bb33d35786865fac/assets/shaders/Scatter.glsl#L200