here is my code I realy got stucked for a while cous I can’t make this one I’m a beginer with the shaders could you guys help me?
this is my fragmen shader:
#version 330
uniform vec4 color;
void main(void)
{
//xsize of the block 100.0 y size of the block 100.0
//vec2 position = vec2 (gl_FragCoord.x/100.0,gl_FragCoord.y/100.0)-vec2(0.5);
vec2 position = (gl_FragCoord.xy * 0.5f);
float len = length (position);
gl_FragColor = vec4(color.r * (1.0 - len),color.g * (1.0 - len),color.b * (1.0 - len),color.a);
}
I want to load it on each block in the game but I can’t make it