13 lines
256 B
GLSL
13 lines
256 B
GLSL
#version 430 core
|
|
in vec4 gColor;
|
|
in vec2 cenPosTrans;
|
|
in float gRad;
|
|
out vec4 fColor;
|
|
|
|
void main()
|
|
{
|
|
vec2 pos = gl_FragCoord.xy;
|
|
float dist = max(0 , 1 - 2 * distance(pos,cenPosTrans) / (gRad));
|
|
fColor = vec4( gColor.xyz , pow(gColor.z*dist,2) );
|
|
}
|