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:
Dmitry Stepanov
2026-03-19 23:21:15 +03:00
parent 99b408e2f4
commit ea74cf35ea
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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,
)?)],
+2 -2
View File
@@ -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,
)?),
+1 -1
View File
@@ -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,
)?;