mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
reduced vram consumption by replacing rgba16f with rgb10a2 textures
- good balance between quality and performance - also works decently for normals, 10 bits precision is giving acceptable gradients
This commit is contained in:
@@ -55,12 +55,12 @@ impl BloomRenderer {
|
||||
height: usize,
|
||||
) -> Result<Self, FrameworkError> {
|
||||
Ok(Self {
|
||||
blur: GaussianBlur::new(server, width, height, PixelKind::RGBA16F)?,
|
||||
blur: GaussianBlur::new(server, width, height, PixelKind::RGB10A2)?,
|
||||
framebuffer: server.create_frame_buffer(
|
||||
None,
|
||||
vec![Attachment::color(server.create_2d_render_target(
|
||||
"Bloom",
|
||||
PixelKind::RGBA16F,
|
||||
PixelKind::RGB10A2,
|
||||
width,
|
||||
height,
|
||||
)?)],
|
||||
|
||||
@@ -95,7 +95,7 @@ impl GBuffer {
|
||||
)?;
|
||||
let normal_texture = server.create_2d_render_target(
|
||||
"GBufferNormalTexture",
|
||||
PixelKind::RGBA16F,
|
||||
PixelKind::RGB10A2,
|
||||
width,
|
||||
height,
|
||||
)?;
|
||||
@@ -111,7 +111,7 @@ impl GBuffer {
|
||||
Attachment::color(normal_texture.clone()),
|
||||
Attachment::color(server.create_2d_render_target(
|
||||
"GBufferAmbientTexture",
|
||||
PixelKind::RGBA16F,
|
||||
PixelKind::RGB10A2,
|
||||
width,
|
||||
height,
|
||||
)?),
|
||||
|
||||
@@ -255,7 +255,7 @@ impl RenderDataContainer {
|
||||
// Intermediate scene frame will be rendered in HDR render target.
|
||||
let hdr_frame_texture = server.create_2d_render_target(
|
||||
"ObserverHdrFrame",
|
||||
PixelKind::RGBA16F,
|
||||
PixelKind::RGB10A2,
|
||||
width,
|
||||
height,
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user