Update default shaders in documentation of webgl classes
This commit is contained in:
@@ -55,6 +55,10 @@ const DEFAULT_FRAGMENT_SHADER = `
|
||||
* This class is used to define Post Processing passes with custom shaders and uniforms.
|
||||
* This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.
|
||||
*
|
||||
* Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that
|
||||
* a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).
|
||||
* Failing to provide pixel colors with premultiplied alpha will result in render anomalies.
|
||||
*
|
||||
* Default shaders are shown hereafter:
|
||||
*
|
||||
* * Vertex shader:
|
||||
@@ -87,6 +91,7 @@ const DEFAULT_FRAGMENT_SHADER = `
|
||||
*
|
||||
* void main() {
|
||||
* gl_FragColor = texture2D(u_image, v_texCoord);
|
||||
* gl_FragColor.rgb *= gl_FragColor.a;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user