pre facing switch
This commit is contained in:
parent
3f4656939c
commit
dd568a75e3
5 changed files with 117 additions and 33 deletions
src/scene
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue