MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / render_extent

Method render_extent

native/shared/src/renderer/mod.rs:6324–6332  ·  view source on GitHub ↗

`width`/`height` are PHYSICAL pixels (the actual GPU surface). `logical_width`/`logical_height` are the points size reported to user code via `screenWidth`/HUD — on non-HiDPI platforms they match the physical size. Render-pass extent used by main_hdr + scene_compose, computed from `render_scale`. At 0.5 this is half the surface size and the TAA pass (or upscale pass) brings it back to the full sur

(&self)

Source from the content-addressed store, hash-verified

6322 /// the TAA pass (or upscale pass) brings it back to the full
6323 /// surface for composite; at 1.0 it matches the surface.
6324 pub fn render_extent(&self) -> (u32, u32) {
6325 let sw = self.surface_config.width as f32;
6326 let sh = self.surface_config.height as f32;
6327 let s = self.render_scale.clamp(0.5, 1.0);
6328 (
6329 ((sw * s).round() as u32).max(1),
6330 ((sh * s).round() as u32).max(1),
6331 )
6332 }
6333
6334 pub fn resize(&mut self, width: u32, height: u32, logical_width: u32, logical_height: u32) {
6335 if width > 0 && height > 0 {

Callers 3

resizeMethod · 0.80
begin_mode_3dMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected