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

Fix #10: implicit cast in shader.

This commit is contained in:
Filippo Scognamiglio 2014-07-09 19:15:56 +02:00
parent ef3303134d
commit 17615a9f14

View File

@ -251,7 +251,7 @@ Item{
coords.x = floor(virtual_resolution.x * coords.x) / virtual_resolution.x;" : "")
: "") +
"coords = coords + delta;" +
"vec4 vcolor = texture2D(source, coords).r * 256.0;
"vec4 vcolor = texture2D(source, coords) * 256.0;
float color = vcolor.r * 0.21 + vcolor.g * 0.72 + vcolor.b + 0.04;" +
(mBlur !== 0 ?
"float blurredSourceColor = texture2D(blurredSource, coords).a * 256.0;" +
@ -262,6 +262,8 @@ Item{
"gl_FragColor.a = floor(color) / 256.0;" +
"}"
onStatusChanged: if (log) console.log(log) //Print warning messages
}
///////////////////////////////////////////////////////////////////////////
// EFFECTS //////////////////////////////////////////////////////////////
@ -330,6 +332,8 @@ Item{
"void main() {" +
"gl_FragColor.a = smoothNoise(qt_TexCoord0 * virtual_resolution);" +
"}"
onStatusChanged: if (log) console.log(log) //Print warning messages
}
ShaderEffectSource{
id: staticNoiseSource
@ -403,7 +407,10 @@ Item{
"gl_FragColor.a = color;" +
"}"
onStatusChanged: if (log) console.log(log) //Print warning messages
}
onStatusChanged: if (log) console.log(log) //Print warning messages
}
ShaderEffectSource{
id: rasterizationEffectSource