1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-01-31 02:01:19 +00:00

Storing some computations to texture.

This commit is contained in:
Filippo Scognamiglio 2014-06-28 11:47:10 +02:00
parent 211afe6dce
commit 9eee62b3a4
3 changed files with 7 additions and 3 deletions

View File

@ -359,7 +359,12 @@ Item{
}" + }" +
"void main() {" + "void main() {" +
"gl_FragColor.a = getScanlineIntensity(qt_TexCoord0);" + "float distance = length(vec2(0.5) - qt_TexCoord0);" +
"float color = getScanlineIntensity(qt_TexCoord0);" +
"color = mix(color, 0.0, 1.2 * distance * distance);" +
"gl_FragColor.a = color;" +
"}" "}"
} }
ShaderEffectSource{ ShaderEffectSource{

View File

@ -169,7 +169,6 @@ ShaderEffect {
color += texture2D(bloomSource, coords).r *" + str(2.5 * bloom) + ";" : "") + color += texture2D(bloomSource, coords).r *" + str(2.5 * bloom) + ";" : "") +
"vec3 finalColor = mix(background_color, font_color, color).rgb;" + "vec3 finalColor = mix(background_color, font_color, color).rgb;" +
"finalColor = mix(finalColor * 1.1, vec3(0.0), 1.2 * distance * distance);" +
"finalColor *= texture2D(rasterizationSource, coords).a;" + "finalColor *= texture2D(rasterizationSource, coords).a;" +
(brightness_flickering !== 0 ? " (brightness_flickering !== 0 ? "

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2014-06-27T20:58:56. --> <!-- Written by QtCreator 3.0.1, 2014-06-28T10:14:09. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>