mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-03-20 17:48:46 +00:00
Fix: Improve a bit and fix visual issues with bloom.
This commit is contained in:
parent
ce5658a205
commit
38d4c5dd52
@ -284,16 +284,12 @@ ShaderEffect {
|
|||||||
:
|
:
|
||||||
"vec3 finalColor = mix(background_color.rgb, font_color.rgb, greyscale_color);") +
|
"vec3 finalColor = mix(background_color.rgb, font_color.rgb, greyscale_color);") +
|
||||||
|
|
||||||
"finalColor *= getScanlineIntensity(coords);
|
"finalColor *= getScanlineIntensity(coords);" +
|
||||||
finalColor *= smoothstep(-dispX, 0.0, coords.x) - smoothstep(1.0, 1.0 + dispX, coords.x);
|
|
||||||
finalColor *= smoothstep(-dispY, 0.0, coords.y) - smoothstep(1.0, 1.0 + dispY, coords.y);" +
|
|
||||||
|
|
||||||
(bloom_strength !== 0 ?
|
(bloom_strength !== 0 ?
|
||||||
"vec4 bloomFullColor = texture2D(bloomSource, coords);
|
"vec4 bloomFullColor = texture2D(bloomSource, coords);
|
||||||
vec3 bloomColor = bloomFullColor.rgb;
|
vec3 bloomColor = bloomFullColor.rgb;
|
||||||
vec2 minBound = step(vec2(0.0), coords);
|
float bloomAlpha = bloomFullColor.a;" +
|
||||||
vec2 maxBound = step(coords, vec2(1.0));
|
|
||||||
float bloomAlpha = bloomFullColor.a * minBound.x * minBound.y * maxBound.x * maxBound.y;" +
|
|
||||||
(chroma_color !== 0 ?
|
(chroma_color !== 0 ?
|
||||||
"bloomColor = font_color.rgb * mix(vec3(rgb2grey(bloomColor)), bloomColor, chroma_color);"
|
"bloomColor = font_color.rgb * mix(vec3(rgb2grey(bloomColor)), bloomColor, chroma_color);"
|
||||||
:
|
:
|
||||||
@ -301,6 +297,9 @@ ShaderEffect {
|
|||||||
"finalColor += bloomColor * bloom_strength * bloomAlpha;"
|
"finalColor += bloomColor * bloom_strength * bloomAlpha;"
|
||||||
: "") +
|
: "") +
|
||||||
|
|
||||||
|
"finalColor *= smoothstep(-dispX, 0.0, coords.x) - smoothstep(1.0, 1.0 + dispX, coords.x);
|
||||||
|
finalColor *= smoothstep(-dispY, 0.0, coords.y) - smoothstep(1.0, 1.0 + dispY, coords.y);" +
|
||||||
|
|
||||||
(brightness_flickering !== 0 ? "
|
(brightness_flickering !== 0 ? "
|
||||||
finalColor *= brightness;" : "") +
|
finalColor *= brightness;" : "") +
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit fb04792ae3dfbbc40a8d957a7b7300a98862bb9d
|
Subproject commit b003cff04f5891abe15086e946a0630e66efb242
|
Loading…
x
Reference in New Issue
Block a user