fragment

fragment: string

The GLSL implementation of the fragment shader. Instead of main, it implements vec4 effectMain() returning the color to be output. effectMain should sample u_diffuse directly using TEXTURE() or TEXTURE_PROJ() instead of texture2D(), texture2DProj(), or texture(); or, if ScreenSpaceEffectSource.sampleSourcePixel is defined, it can use sampleSourcePixel() instead. It should not assign to gl_FragColor. The alpha component of the output color is ignored as there is nothing with which to blend.

Defined in

Last Updated: 11 June, 2024