Module three_d::core::render_target
source · Expand description
Functionality for rendering to the screen or into textures.
Structs§
- Defines which channels (red, green, blue, alpha and depth) to clear when starting to write to a RenderTarget. If
None
then the channel is not cleared and ifSome(value)
the channel is cleared to that value (the value must be between 0 and 1). - Adds additional functionality to clear, read from and write to a texture. Use the
as_color_target
function directly on the texture structs (for example Texture2D) to construct a color target. Combine this together with a DepthTarget with RenderTarget::new to be able to write to both a depth and color target at the same time. A color target purely adds functionality, so it can be created each time it is needed, the actual data is saved in the texture. - A multisample render target for color data. Use this if you want to avoid aliasing, ie. jagged edges, when rendering to a ColorTarget.
- Adds additional functionality to clear, read from and write to a texture. Use the
as_depth_target
function directly on the texture structs (for example DepthTexture2D) to construct a depth target. Combine this together with a ColorTarget with RenderTarget::new to be able to write to both a depth and color target at the same time. A depth target purely adds functionality, so it can be created each time it is needed, the actual data is saved in the texture. - A multisample render target for depth data. Use this if you want to avoid aliasing, ie. jagged edges, when rendering to a DepthTarget.
- Adds additional functionality to clear, read from and write to the screen (see RenderTarget::screen) or a color texture and a depth texture at the same time (see RenderTarget::new). If you only want to perform an operation on either a color texture or depth texture, see ColorTarget and DepthTarget respectively. A render target purely adds functionality, so it can be created each time it is needed, the actual data is saved in the textures.
- A multisampled render target for color and depth data. Use this if you want to avoid aliasing, ie. jagged edges, when rendering to a RenderTarget.