and the problem was a query that I mis-typed. damn
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use bytemuck::__core::ops::Range;
|
||||
use bytemuck::{Zeroable, Pod};
|
||||
use crate::{OPENGL_TO_WGPU_MATRIX, DirectionalLight, Position};
|
||||
use cgmath::Point3;
|
||||
|
||||
|
||||
#[repr(C)]
|
||||
@@ -16,10 +17,10 @@ unsafe impl Pod for LightRaw {}
|
||||
unsafe impl Zeroable for LightRaw {}
|
||||
|
||||
impl DirectionalLight {
|
||||
pub fn to_raw(&self, pos: Position) -> LightRaw {
|
||||
pub fn to_raw(&self, pos: Point3<f32>) -> LightRaw {
|
||||
use cgmath::{Deg, EuclideanSpace, Matrix4, PerspectiveFov, Point3, Vector3};
|
||||
|
||||
let pos = cgmath::Point3::new(pos.x, pos.y, pos.z);
|
||||
//let pos = cgmath::Point3::new(pos.x, pos.y, pos.z);
|
||||
let mx_view = Matrix4::look_at(pos, Point3::origin(), Vector3::unit_z());
|
||||
let projection = PerspectiveFov {
|
||||
fovy: Deg(self.fov).into(),
|
||||
|
||||
Reference in New Issue
Block a user