mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-12 07:59:07 +00:00
Fix #10: implicit cast in shader.
This commit is contained in:
parent
ef3303134d
commit
17615a9f14
@ -251,7 +251,7 @@ Item{
|
|||||||
coords.x = floor(virtual_resolution.x * coords.x) / virtual_resolution.x;" : "")
|
coords.x = floor(virtual_resolution.x * coords.x) / virtual_resolution.x;" : "")
|
||||||
: "") +
|
: "") +
|
||||||
"coords = coords + delta;" +
|
"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;" +
|
float color = vcolor.r * 0.21 + vcolor.g * 0.72 + vcolor.b + 0.04;" +
|
||||||
(mBlur !== 0 ?
|
(mBlur !== 0 ?
|
||||||
"float blurredSourceColor = texture2D(blurredSource, coords).a * 256.0;" +
|
"float blurredSourceColor = texture2D(blurredSource, coords).a * 256.0;" +
|
||||||
@ -262,6 +262,8 @@ Item{
|
|||||||
|
|
||||||
"gl_FragColor.a = floor(color) / 256.0;" +
|
"gl_FragColor.a = floor(color) / 256.0;" +
|
||||||
"}"
|
"}"
|
||||||
|
|
||||||
|
onStatusChanged: if (log) console.log(log) //Print warning messages
|
||||||
}
|
}
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// EFFECTS //////////////////////////////////////////////////////////////
|
// EFFECTS //////////////////////////////////////////////////////////////
|
||||||
@ -330,6 +332,8 @@ Item{
|
|||||||
"void main() {" +
|
"void main() {" +
|
||||||
"gl_FragColor.a = smoothNoise(qt_TexCoord0 * virtual_resolution);" +
|
"gl_FragColor.a = smoothNoise(qt_TexCoord0 * virtual_resolution);" +
|
||||||
"}"
|
"}"
|
||||||
|
|
||||||
|
onStatusChanged: if (log) console.log(log) //Print warning messages
|
||||||
}
|
}
|
||||||
ShaderEffectSource{
|
ShaderEffectSource{
|
||||||
id: staticNoiseSource
|
id: staticNoiseSource
|
||||||
@ -403,7 +407,10 @@ Item{
|
|||||||
|
|
||||||
"gl_FragColor.a = color;" +
|
"gl_FragColor.a = color;" +
|
||||||
"}"
|
"}"
|
||||||
|
|
||||||
|
onStatusChanged: if (log) console.log(log) //Print warning messages
|
||||||
}
|
}
|
||||||
|
onStatusChanged: if (log) console.log(log) //Print warning messages
|
||||||
}
|
}
|
||||||
ShaderEffectSource{
|
ShaderEffectSource{
|
||||||
id: rasterizationEffectSource
|
id: rasterizationEffectSource
|
||||||
|
Loading…
x
Reference in New Issue
Block a user