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

Method set_ambient_light

native/shared/src/renderer/mod.rs:12440–12443  ·  view source on GitHub ↗
(&mut self, r: f64, g: f64, b: f64, intensity: f64)

Source from the content-addressed store, hash-verified

12438 // ============================================================
12439
12440 pub fn set_ambient_light(&mut self, r: f64, g: f64, b: f64, intensity: f64) {
12441 self.lighting_uniforms.ambient = [(r / 255.0) as f32, (g / 255.0) as f32, (b / 255.0) as f32, intensity as f32];
12442 self.queue.write_buffer(&self.lighting_buffer, 0, bytemuck::bytes_of(&self.lighting_uniforms));
12443 }
12444
12445 pub fn set_directional_light(&mut self, dx: f64, dy: f64, dz: f64, r: f64, g: f64, b: f64, intensity: f64) {
12446 // Note: the shadow cache reads `lighting_uniforms.light_dir`

Callers 7

bloom_set_ambient_lightFunction · 0.80
bloom_set_ambient_lightFunction · 0.80
bloom_set_ambient_lightFunction · 0.80
bloom_set_ambient_lightFunction · 0.80
bloom_set_ambient_lightFunction · 0.80
bloom_set_ambient_lightFunction · 0.80
bloom_set_ambient_lightFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected