author | František Kučera <franta-hg@frantovo.cz> |
Sun, 03 Dec 2023 19:22:25 +0100 | |
branch | v_0 |
changeset 17 | f53a040bdc89 |
parent 15 | shaders/default.frag@1eb7cfefbeea |
child 18 | c4384f43c739 |
permissions | -rw-r--r-- |
0 | 1 |
#version 330 core |
2 |
||
2
3faef2f5128e
better GLSL variable names
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
3 |
uniform sampler2D uTexture; |
3faef2f5128e
better GLSL variable names
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
4 |
in vec2 vTextureXY; |
14
ceeb36fad818
transparency/alpha: simple binary transparent/opaque, no blending, just discard some fragments
František Kučera <franta-hg@frantovo.cz>
parents:
11
diff
changeset
|
5 |
out vec4 fColor; |
0 | 6 |
|
7 |
void main(){ |
|
14
ceeb36fad818
transparency/alpha: simple binary transparent/opaque, no blending, just discard some fragments
František Kučera <franta-hg@frantovo.cz>
parents:
11
diff
changeset
|
8 |
fColor = texture(uTexture, vTextureXY).rgba; |
ceeb36fad818
transparency/alpha: simple binary transparent/opaque, no blending, just discard some fragments
František Kučera <franta-hg@frantovo.cz>
parents:
11
diff
changeset
|
9 |
|
17
f53a040bdc89
new shader: scanlines-basic.frag
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
10 |
float lineCount = 260.; |
f53a040bdc89
new shader: scanlines-basic.frag
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
11 |
fColor.xyz *= abs(sin(radians(vTextureXY.y * 180. * lineCount))); |
0 | 12 |
} |