Shadows go brrr
This commit is contained in:
@@ -21,18 +21,25 @@ void Light::SetUp(const dae::Vector3 &up) {
|
||||
}
|
||||
|
||||
dae::Matrix Light::GetViewMatrix() const {
|
||||
auto test = dae::Matrix::CreateLookAtLH(m_Position, m_Target, m_Up);
|
||||
return dae::Matrix::CreateLookAtLH(m_Position, m_Target, m_Up);
|
||||
}
|
||||
|
||||
dae::Matrix Light::GetProjectionMatrix(float nearPlane, float farPlane, float size) const {
|
||||
return dae::Matrix::CreateOrthographic(size, size, nearPlane, farPlane);
|
||||
}
|
||||
|
||||
dae::Matrix Light::GetViewProjectionMatrix(float nearPlane, float farPlane, float size) const {
|
||||
return GetViewMatrix() * GetProjectionMatrix(nearPlane, farPlane, size);
|
||||
}
|
||||
|
||||
void Light::Update() {
|
||||
// If the light position or target changes dynamically, this is where updates would be managed.
|
||||
}
|
||||
// m_ViewMatrix = dae::Matrix::CreateLookAtLH(m_Position, m_Target, m_Up);
|
||||
// m_ProjectionMatrix = dae::Matrix::CreateOrthographic(size, size, nearPlane, farPlane);
|
||||
}
|
||||
|
||||
dae::Vector3 Light::GetTarget() {
|
||||
return m_Target;
|
||||
}
|
||||
|
||||
dae::Vector3 Light::GetPosition() {
|
||||
return m_Position;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user