This commit is contained in:
2025-02-07 17:04:43 -06:00
parent 33fd7ddf72
commit 8eec81c7f4
2249 changed files with 75331 additions and 685 deletions

View File

@@ -0,0 +1,19 @@
varying vec2 v_TexCoord;
uniform sampler2D g_Texture0;
uniform vec2 g_TexelSize;
// Proper gamma conversion http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html
vec3 srgb(vec3 v)
{
vec3 c = step(0.04045, v);
return c * (pow((v + 0.055) / 1.055, 2.4)) + (1 - c) * (v / 12.92);
}
void main()
{
vec3 albedo = texSample2D(g_Texture0, v_TexCoord).rgb;
gl_FragColor = vec4(srgb(saturate(albedo)), 1.0);
}