Struct amethyst_renderer::target::GeometryBuffer
[−]
[src]
pub struct GeometryBuffer<R: Resources> { pub normal: RenderTargetView<R, [f32; 4]>, pub ka: RenderTargetView<R, ColorFormat>, pub kd: RenderTargetView<R, ColorFormat>, pub ks: RenderTargetView<R, ColorFormat>, pub depth: DepthStencilView<R, DepthFormat>, pub texture_normal: ShaderResourceView<R, [f32; 4]>, pub texture_ka: ShaderResourceView<R, [f32; 4]>, pub texture_kd: ShaderResourceView<R, [f32; 4]>, pub texture_ks: ShaderResourceView<R, [f32; 4]>, pub texture_depth: ShaderResourceView<R, f32>, }
A geometry buffer that is used in a deferred pipeline.
TODO: Why both ka
and texture_ka
, etc?
Fields
normal: RenderTargetView<R, [f32; 4]>
Contains the Normals as a f32x4
ka: RenderTargetView<R, ColorFormat>
Contains the ambient color
kd: RenderTargetView<R, ColorFormat>
Contains the diffuse color
ks: RenderTargetView<R, ColorFormat>
Contains the specular color
depth: DepthStencilView<R, DepthFormat>
Contains the depth buffer
texture_normal: ShaderResourceView<R, [f32; 4]>
The normal buffer as a texture
texture_ka: ShaderResourceView<R, [f32; 4]>
The ambient color as texture
texture_kd: ShaderResourceView<R, [f32; 4]>
The diffuse color as a texture
texture_ks: ShaderResourceView<R, [f32; 4]>
The specular color as a texture
texture_depth: ShaderResourceView<R, f32>
The depth buffer as a texture
Methods
impl<R: Resources> GeometryBuffer<R>
[src]
fn new<F>(factory: &mut F, (width, height): (u16, u16)) -> Self where
F: Factory<R>,
F: Factory<R>,
Create a new GeometryBuffer with the supplied factory the buffer will be allocated to the supplied width and height