You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
431 B
C

varying highp vec2 v_Position;
varying lowp vec4 v_Colour;
uniform highp vec2 flashlightPos;
uniform highp vec2 flashlightSize;
uniform lowp float flashlightDim;
const mediump float smoothness = 1.1;
lowp vec4 getColourAt(highp vec2, highp vec2, lowp vec4);
void main(void)
{
gl_FragColor = mix(getColourAt(flashlightPos - v_Position, flashlightSize, v_Colour), vec4(0.0, 0.0, 0.0, 1.0), flashlightDim);
}