[Overview][Constants][Classes][Index] | Reference for unit 'nvGLPainter' (#nvidia-widgets)

# cWidgetFSSource

## Declaration

Source position: nvglpainter.pas line 78

`const cWidgetFSSource = '#version 120' + LineEnding + 'uniform vec4 fillColor /*= vec4( 1.0, 0.0,0.0,1.0)*/;' + LineEnding + 'uniform vec4 borderColor /*= vec4( 1.0, 1.0,1.0,1.0)*/;' + LineEnding + 'uniform vec2 zones;' + LineEnding + LineEnding + 'void main()' + LineEnding + '{' + LineEnding + ' float doTurn = float(gl_TexCoord[0].y > 0);' + LineEnding + ' float radiusOffset = doTurn * abs( gl_TexCoord[0].z );' + LineEnding + ' float turnDir = sign( gl_TexCoord[0].z );' + LineEnding + ' vec2 uv = vec2(gl_TexCoord[0].x + turnDir*radiusOffset, gl_TexCoord[0].y);' + LineEnding + ' float l = abs( length(uv) - radiusOffset );' + LineEnding + ' float a = clamp( l - zones.x, 0.0, 2.0);' + LineEnding + ' float b = clamp( l - zones.y, 0.0, 2.0);' + LineEnding + ' b = exp2(-2.0*b*b);' + LineEnding + ' gl_FragColor = ( fillColor * b + (1.0-b)*borderColor );' + LineEnding + ' gl_FragColor.a *= exp2(-2.0*a*a);' + LineEnding + '}';`