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

# cTexViewWidgetFSSource

## Declaration

Source position: nvglpainter.pas line 98

`const cTexViewWidgetFSSource = '#version 120' + LineEnding + 'uniform float mipLevel /*= 0*/;' + LineEnding + 'uniform float texelScale /*= 1.0*/;' + LineEnding + 'uniform float texelOffset /*= 0.0*/;' + LineEnding + 'uniform ivec4 texelSwizzling /*= ivec4( 0, 1, 2, 3)*/;' + LineEnding + 'uniform sampler2D samp;' + LineEnding + LineEnding + 'void main()' + LineEnding + '{' + LineEnding + ' vec4 texel;' + LineEnding + ' if (mipLevel > 0)' + LineEnding + ' texel = texture2DLod( samp, gl_TexCoord[0].xy, mipLevel);' + LineEnding + ' else' + LineEnding + ' texel = texture2D( samp, gl_TexCoord[0].xy);' + LineEnding + ' texel = texel * texelScale + texelOffset;' + LineEnding + ' gl_FragColor = texel.x * vec4( texelSwizzling.x == 0, texelSwizzling.y == 0, texelSwizzling.z == 0, texelSwizzling.w == 0 );' + LineEnding + ' gl_FragColor += texel.y * vec4( texelSwizzling.x == 1, texelSwizzling.y == 1, texelSwizzling.z == 1, texelSwizzling.w == 1 );' + LineEnding + ' gl_FragColor += texel.z * vec4( texelSwizzling.x == 2, texelSwizzling.y == 2, texelSwizzling.z == 2, texelSwizzling.w == 2 );' + LineEnding + ' gl_FragColor += texel.w * vec4( texelSwizzling.x == 3, texelSwizzling.y == 3, texelSwizzling.z == 3, texelSwizzling.w == 3 );' + LineEnding + '}';`