Refactor engine to support double-precision vectors

This commit is contained in:
Wojtek Figat
2022-06-13 00:40:32 +02:00
parent f82e370392
commit a881c90b2e
744 changed files with 19062 additions and 12467 deletions

View File

@@ -24,10 +24,10 @@ void DirectionalLight::Draw(RenderContext& renderContext)
&& (ViewDistance < ZeroTolerance || Vector3::DistanceSquared(renderContext.View.Position, GetPosition()) < ViewDistance * ViewDistance))
{
RendererDirectionalLightData data;
data.Position = GetPosition();
data.Position = GetPosition(); // TODO: large-worlds
data.MinRoughness = MinRoughness;
data.ShadowsDistance = ShadowsDistance;
data.Color = Color.ToVector3() * (Color.A * brightness);
data.Color = Color.ToFloat3() * (Color.A * brightness);
data.ShadowsStrength = ShadowsStrength;
data.Direction = GetDirection();
data.ShadowsFadeDistance = ShadowsFadeDistance;
@@ -62,7 +62,7 @@ void DirectionalLight::Deserialize(DeserializeStream& stream, ISerializeModifier
DESERIALIZE(CascadeCount);
}
bool DirectionalLight::IntersectsItself(const Ray& ray, float& distance, Vector3& normal)
bool DirectionalLight::IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
{
return false;
}