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

Method set_render_scale

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

Set the render-resolution multiplier explicitly. Clamped to [0.5, 1.0]. Triggers a resize so render-res intermediates pick up the new extent. Marks the scale as user-set so future `set_taa_enabled` calls leave it alone.

(&mut self, scale: f32)

Source from the content-addressed store, hash-verified

6586 /// pick up the new extent. Marks the scale as user-set so future
6587 /// `set_taa_enabled` calls leave it alone.
6588 pub fn set_render_scale(&mut self, scale: f32) {
6589 let s = scale.clamp(0.5, 1.0);
6590 self.render_scale_explicit = true;
6591 if (s - self.render_scale).abs() > 1e-4 {
6592 self.render_scale = s;
6593 self.taa_frame_index = 0;
6594 let (w, h) = (self.surface_config.width, self.surface_config.height);
6595 self.resize(w, h, self.logical_width, self.logical_height);
6596 }
6597 }
6598
6599 /// Upscale filter when `render_scale < 1.0 && !taa_enabled`.
6600 /// 0 = bilinear (cheap, soft), 1 = Catmull-Rom (sharper, default).

Callers 6

bloom_set_render_scaleFunction · 0.80
bloom_set_render_scaleFunction · 0.80
bloom_set_render_scaleFunction · 0.80
tickMethod · 0.80
bloom_set_render_scaleFunction · 0.80
bloom_set_render_scaleFunction · 0.80

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected