Wallpaper: shaders improvements with more parameters and new Stripes shader
This commit is contained in:
parent
d36bcb1d4d
commit
477d38d928
12 changed files with 260 additions and 66 deletions
|
|
@ -7,16 +7,13 @@ layout(binding = 2) uniform sampler2D source2;
|
|||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 qt_Matrix;
|
||||
float qt_Opacity;
|
||||
float fade;
|
||||
float progress;
|
||||
};
|
||||
|
||||
void main() {
|
||||
vec4 color1 = texture(source1, qt_TexCoord0);
|
||||
vec4 color2 = texture(source2, qt_TexCoord0);
|
||||
|
||||
// Smooth cross-fade using smoothstep for better visual quality
|
||||
float smoothFade = smoothstep(0.0, 1.0, fade);
|
||||
|
||||
// Mix the two textures based on fade value
|
||||
fragColor = mix(color1, color2, smoothFade) * qt_Opacity;
|
||||
// Mix the two textures based on progress value
|
||||
fragColor = mix(color1, color2, progress) * qt_Opacity;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue