pre facing switch

This commit is contained in:
zomseffen 2025-01-13 16:18:05 +01:00
parent 3f4656939c
commit dd568a75e3
5 changed files with 117 additions and 33 deletions
src/scene

View file

@ -11,7 +11,7 @@ pub struct PointLight{
impl PointLight {
pub fn get_buffer_mem_size(&self) -> u32 {
4 * 3 + 4 * 3
3 + 3
}
pub fn insert_into_memory(&self, mut v: Vec<u32>) -> Vec<u32> {
@ -19,9 +19,9 @@ impl PointLight {
v[self.memory_start + 1] = self.pos.y as u32;
v[self.memory_start + 2] = self.pos.z as u32;
v[self.memory_start + 3] = self.color.x as u32;
v[self.memory_start + 4] = self.color.y as u32;
v[self.memory_start + 5] = self.color.z as u32;
v[self.memory_start + 3] = (self.color.x * 255.0) as u32;
v[self.memory_start + 4] = (self.color.y * 255.0) as u32;
v[self.memory_start + 5] = (self.color.z * 255.0) as u32;
v
}