mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
+ | Basic shader
This commit is contained in:
@ -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;
|
||||
}
|
Reference in New Issue
Block a user