Rewritten. Works as a charm now.
This commit is contained in:
@@ -15,17 +15,16 @@ struct DirectionalLightJob : RenderJob
|
||||
DirectionalLightJob(ComponentWrapper transformComponent, ComponentWrapper directionalLightComponent, World* m_World)
|
||||
: RenderJob()
|
||||
{
|
||||
Orientation = Transform::AbsoluteOrientation(m_World, transformComponent.EntityID);
|
||||
Direction = glm::vec4(0,0,-1,0) * glm::inverse(Orientation);
|
||||
|
||||
Direction = glm::vec4(0,0,-1,0) * glm::inverse(Transform::AbsoluteOrientation(m_World, transformComponent.EntityID));
|
||||
//Direction = glm::vec4((glm::vec3)directionalLightComponent["Direction"], 0.f);
|
||||
Color = (glm::vec4)directionalLightComponent["Color"];
|
||||
Intensity = (double)directionalLightComponent["Intensity"];
|
||||
};
|
||||
|
||||
glm::quat Orientation;
|
||||
glm::vec4 Direction;
|
||||
glm::vec4 Color;
|
||||
float Intensity;
|
||||
bool TextureAlphaShadows = false;
|
||||
|
||||
void CalculateHash() override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user