Creates a new CameraFrame instance.
The application.
The camera component.
The bloom effect, registered with this camera frame. Its parameters are assigned directly.
The color enhancement effect, registered with this camera frame. Its parameters are assigned directly.
The color lookup table (LUT) effect, registered with this camera frame. Its parameters are assigned directly.
Debug rendering, which displays an intermediate value of the frame in place of the composed result. This never changes what the frame renders - a mode whose value this frame does not generate simply displays nothing: 'depth' renders black when no effect has produced the scene depth, and the modes of a disabled effect are ignored. Set to null to disable.
Besides the built-in modes, this accepts the name of a debug view provided by an effect registered with this camera frame, see CameraFrameEffect#debugViews.
The depth of field effect, registered with this camera frame. Its parameters are assigned directly.
The effects registered with this camera frame, in the order they are applied within their compose slot. The built-in effects are registered by the constructor; add your own with CameraFrame#addEffect. Treat the array as read-only; use the methods of the camera frame to change it.
The fringing effect, registered with this camera frame. Its parameters are assigned directly.
The color grading effect, registered with this camera frame. Its parameters are assigned directly.
Rendering settings.
The screen space ambient occlusion effect, registered with this camera frame. Its parameters are assigned directly.
Taa settings.
The vignette effect, registered with this camera frame. Its parameters are assigned directly.
The volumetric fog effect, registered with this camera frame. Its parameters are assigned directly.
Gets the enabled state of the camera frame.
Sets the enabled state of the camera frame. Passing false will release associated resources.
Registers an effect with this camera frame. The effect is applied at the compose slot it declares, after any effect already registered to that slot, from the next call to CameraFrame#update. The effect stays owned by the caller: removing it or destroying the camera frame does not destroy it.
The effect to add.
Creates a frame pass for the camera frame. Override this method to utilize a custom frame
pass, typically one that extends FramePassCameraFrame.
Destroys the camera frame, removing all render passes.
Returns the registered effect with the given id, or undefined when no effect of that type is registered.
The id the effect was constructed with, for example 'vignette'.
The effect.
Registers an effect with this camera frame, applying it before another registered effect when both share a compose slot. The effect is applied from the next call to CameraFrame#update.
The effect to add.
The effect, or the id of the effect, to apply this one before.
Removes an effect from this camera frame. The effect stops being applied from the next call to CameraFrame#update.
The effect to remove.
Applies any changes made to the properties of this instance.
StaticisReturns whether a device is able to let the gaussian splats contribute to the scene depth, which the volumetric fog and the depth of field need in order to be bounded by the splats instead of drawing through them. Their contribution additionally has to be turned on using GSplatParams#sceneDepthWrite; this reports whether doing so can take effect, so that an application rendering gaussian splats can disable those effects on the devices which cannot respect them.
This tests the device alone, and so can be called before any camera frame is created. Whether a particular one then renders the depth this way also depends on its own settings - multi-sampling and a camera not clearing the whole of its render target both rule it out - and a debug build warns, naming the reason, when the splats end up not contributing.
The graphics device.
True if the splats can contribute to the scene depth.
Implementation of a simple to use camera rendering pass, which supports SSAO, Bloom and other rendering effects.
Overriding compose shader chunks: The final compose pass registers its shader chunks in a way that does not override any chunks that were already provided. To customize the compose pass output, set your shader chunks on the ShaderChunks map before creating the
CameraFrame. Those chunks will be picked up by the compose pass and preserved.Example (GLSL):
Example