mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-31 02:01:19 +00:00
Fixes #6 writing to uniform value
This commit is contained in:
parent
87eb525950
commit
27e30ee258
@ -153,6 +153,9 @@ ShaderEffect {
|
||||
"vec2 cc = vec2(0.5) - qt_TexCoord0;" +
|
||||
"float distance = length(cc);" +
|
||||
|
||||
(noise_strength ? "
|
||||
float noise = noise_strength;" : "") +
|
||||
|
||||
(screen_distorsion !== 0 ? "
|
||||
float distortion = dot(cc, cc) * screen_distorsion;
|
||||
vec2 coords = (qt_TexCoord0 - cc * (1.0 + distortion) * distortion);"
|
||||
@ -164,14 +167,14 @@ ShaderEffect {
|
||||
h_distortion += 0.5 * cos(time*0.04 + 0.03 + coords.y*50.0*fract(time/10.0 + 0.4));
|
||||
coords.x = coords.x + h_distortion * horizontal_distortion;" +
|
||||
(noise_strength ? "
|
||||
noise_strength += horizontal_distortion * 0.5;" : "")
|
||||
noise += horizontal_distortion * 0.5;" : "")
|
||||
: "") +
|
||||
|
||||
|
||||
"float color = texture2D(source, coords).r;" +
|
||||
|
||||
(noise_strength !== 0 ? "
|
||||
color += stepNoise(coords) * noise_strength * (1.0 - distance * distance * 2.0);" : "") +
|
||||
color += stepNoise(coords) * noise * (1.0 - distance * distance * 2.0);" : "") +
|
||||
|
||||
(glowing_line_strength !== 0 ? "
|
||||
color += randomPass(coords) * glowing_line_strength;" : "") +
|
||||
|
Loading…
x
Reference in New Issue
Block a user