Read-only access to the objects context, used to get context information and WebGL API access.
Geometry used to draw on. This is not provided by default to allow for geometry sharing. If no triangle is given, the ndc triangle will be created and managed internally.
Tracks ownership of the ndc-filling triangle.
If provided, depth will be linearized when depth data is blitted.
Uniform for passing the debug mode to the specialized blit program.
Uniform for passing the destination bounds to blit.
Uniform used to pass near and far data to the specialized blit program for linearization.
Uniform for passing the filter to blit: true for nearest, false otherwise (linear).
Uniform for passing the source bounds to blit.
Asserts the objects initialization status to be true. Note that the implementation is cached and forwarded to either an empty function when initialized and to an acutal assert(false) otherwise.
Asserts the objects initialization status to be false. Note that the implementation is cached and forwarded to either an empty function when uninitialized and to an acutal assert(false) otherwise.
Specify a debug mode for blitting @see {@link Blitpass.Debug}. If the debug mode is set to anything except
Debug.None
for the first time, a specialized debug program will be created, initialized, and used for blit.
The draw buffer to blit to (currently, this is expected to refer to a texture attachment of this._target or gl.BACK). Please note that this will be ignored if WebGL 1 is used without a WEBGL_draw_buffer extension. Furthermore, if the drawBuffer is gl.BACK, a DefaultBuffer is expected as target.
GLenum that specifies the draw buffer.
Specify the bounds of the destination rectangle within the write buffer of the write framebuffer.
[srcX0, srcY0, srcX1, srcY1] as used in glBlitFramebuffer. If bounds is undefined, the full size of the destination (target) buffer will be used.
Specify whether or not experimental WebGL blit can be used if available.
If true, program based blit instead of WebGL experimental blit function will be used.
If linearized is enabled, depth buffer blitting will use this far value for linearization.
Specifies the interpolation to be applied if the image is stretched. Must be GL_NEAREST or GL_LINEAR.
Sets the framebuffer that is to be blitted.
Framebuffer that is to be blitted.
Property getter for readonly access to the initialization status of an initializable instance.
If linearized is enabled, depth buffer blitting will use this near value for linearization.
The read buffer to blit from (currently, this is expected to refer to a texture attachment of this._framebuffer).
GLenum that is to be queried from the FBO.
Specify the bounds of the source rectangle within the read buffer of the read framebuffer.
[srcX0, srcY0, srcX1, srcY1] as used in glBlitFramebuffer. If bounds is undefined, the full size of the source buffer (framebuffer) will be used.
Framebuffer to blit the given framebuffer (@see framebuffer} into.
Framebuffer to blit into.
Used to create (on-demand) the blit program for program based blitting. This function can be specialized, e.g.,
for creating custom blit passes such as the DebugPass
DebugPass. This method assumes the program to be
undefined.
A blit frame either blits or draws the color attachment of the given framebuffer to the target framebuffer. For program based/indirect blit a viewport filling area, i.e., a screen-aligned triangle is used.
Specializes this pass's uninitialization. Program and geometry resources are released (if allocated). Cached uniform and attribute locations are invalidated.
Method decorator for asserting the initialization status of an initializable to be true.
Method decorator for asserting the initialization status of an initializable to be false.
Method decorator for discarding of Initializable inheritors. This decorator asserts the initialization
status of the instance that is to be discarded, invokes its uninitialization, and falsifies the
initialization status. In order to encourage the use of assertInitialized
and assertUninitialized
they are
dynamically bound to a static, always-failing assert and an empty/undefined function respectively.
Method decorator for initialization of Initializable inheritors. This decorator asserts the initialization status
of the instance that is to be initialized, invokes its initialization with arbitrary number of parameters,
and sets the initialization status to the initialization success (either false or true).
In order to encourage the use of assertInitialized
and assertUninitialized
they are dynamically
bound to either a static, always-failing assert or an empty/undefined function.
Method decorator for uninitialization of Initializable inheritors. This decorator asserts the initialization
status of the instance that is to be uninitialized, invokes its uninitialization, and falsifies the
initialization status. In order to encourage the use of assertInitialized
and assertUninitialized
they are
dynamically bound to a static, always-failing assert and an empty/undefined function respectively.
This rendering pass specialized the blit pass by enforcing program-based blitting with a custom debug program.
The debug pass can be used as follows:
This pass also provides some basic debugging facilities, such as blitting the input as linearized depth (packed or not packed) etc. An additional WebGL program will be initialized when a debug mode is specified for the first time. The default program blit remains untouched in order to keep it as minimal as possible.