mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2025-02-18 15:57:42 +11:00
parent
fc28962ff5
commit
f281a47e5c
1 changed files with 55 additions and 47 deletions
|
@ -61,6 +61,13 @@ vec4 mixfix(vec4 a, vec4 b, float c)
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 imgColor = COMPAT_TEXTURE(Source, vTexCoord.xy);
|
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 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 green = ( imgColor.g * (LUT_Size - 1.0) + 0.499999 ) / LUT_Size;
|
||||||
float blue1 = (floor( imgColor.b * (LUT_Size - 1.0) ) / LUT_Size) + red;
|
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);
|
FragColor = vec4(mix(imgColor.rgb, res.rgb, min(TNTC,1.0)),1.0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue