+ | Basic shader

This commit is contained in:
RedShip
2024-10-14 20:00:56 +02:00
parent eae1ae4790
commit 163828707a
6 changed files with 134 additions and 179 deletions

View File

@ -1,7 +1,17 @@
#version 330 core
out vec4 FragColor;
#version 430 core
out vec4 FragColor;
uniform vec2 u_resolution;
void main()
{
FragColor = vec4(1.0, 0., 0., 1.);
vec2 uv;
vec4 color;
uv = gl_FragCoord.xy / u_resolution.xy;
uv.x *= u_resolution.x / u_resolution.y;
color = vec4(uv.x, uv.y, 0., 0.);
FragColor = color;
}