mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 01:11:32 +11:00
parent
fc28962ff5
commit
f281a47e5c
|
@ -61,6 +61,13 @@ vec4 mixfix(vec4 a, vec4 b, float c)
|
|||
void main()
|
||||
{
|
||||
vec4 imgColor = COMPAT_TEXTURE(Source, vTexCoord.xy);
|
||||
if (int(TNTC) == 0)
|
||||
{
|
||||
FragColor = imgColor;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
float red = ( imgColor.r * (LUT_Size - 1.0) + 0.499999 ) / (LUT_Size * LUT_Size);
|
||||
float green = ( imgColor.g * (LUT_Size - 1.0) + 0.499999 ) / LUT_Size;
|
||||
float blue1 = (floor( imgColor.b * (LUT_Size - 1.0) ) / LUT_Size) + red;
|
||||
|
@ -102,3 +109,4 @@ void main()
|
|||
|
||||
FragColor = vec4(mix(imgColor.rgb, res.rgb, min(TNTC,1.0)),1.0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue