mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-07 05:31:24 +00:00
Fix wrong gamma colors when using chroma.
This commit is contained in:
parent
e8d5efd3b3
commit
272bc5fe89
@ -296,13 +296,12 @@ ShaderEffect {
|
|||||||
txt_color = max(txt_color, txt_blur.rgb * txt_blur.a);"
|
txt_color = max(txt_color, txt_blur.rgb * txt_blur.a);"
|
||||||
: "") +
|
: "") +
|
||||||
|
|
||||||
"float greyscale_color = rgb2grey(txt_color) + color;" +
|
"txt_color += fontColor.rgb * color;" +
|
||||||
|
"float greyscale_color = rgb2grey(txt_color);" +
|
||||||
|
|
||||||
(chromaColor !== 0 ?
|
(chromaColor !== 0 ?
|
||||||
|
"vec3 foregroundColor = mix(fontColor.rgb, txt_color * fontColor.rgb / greyscale_color, chromaColor);
|
||||||
"vec3 mixedColor = mix(fontColor.rgb, txt_color * fontColor.rgb, chromaColor);
|
vec3 finalColor = mix(backgroundColor.rgb, foregroundColor, greyscale_color);"
|
||||||
vec3 finalBackColor = mix(backgroundColor.rgb, mixedColor, greyscale_color);
|
|
||||||
vec3 finalColor = mix(finalBackColor, fontColor.rgb, color).rgb;"
|
|
||||||
:
|
:
|
||||||
"vec3 finalColor = mix(backgroundColor.rgb, fontColor.rgb, greyscale_color);") +
|
"vec3 finalColor = mix(backgroundColor.rgb, fontColor.rgb, greyscale_color);") +
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user