Various renamings
This commit is contained in:
@@ -39,72 +39,73 @@ namespace
|
||||
CriticalSection MemPoolLocker;
|
||||
}
|
||||
|
||||
void RenderDirectionalLightData::SetupLightData(ShaderLightData* data, bool useShadow) const
|
||||
void RenderDirectionalLightData::SetShaderData(ShaderLightData& data, bool useShadow) const
|
||||
{
|
||||
data->SpotAngles.X = -2.0f;
|
||||
data->SpotAngles.Y = 1.0f;
|
||||
data->SourceRadius = 0;
|
||||
data->SourceLength = 0;
|
||||
data->Color = Color;
|
||||
data->MinRoughness = Math::Max(MinRoughness, MIN_ROUGHNESS);
|
||||
data->Position = Float3::Zero;
|
||||
data->CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data->Direction = -Direction;
|
||||
data->Radius = 0;
|
||||
data->FalloffExponent = 0;
|
||||
data->InverseSquared = 0;
|
||||
data->RadiusInv = 0;
|
||||
data.SpotAngles.X = -2.0f;
|
||||
data.SpotAngles.Y = 1.0f;
|
||||
data.SourceRadius = 0;
|
||||
data.SourceLength = 0;
|
||||
data.Color = Color;
|
||||
data.MinRoughness = Math::Max(MinRoughness, MIN_ROUGHNESS);
|
||||
data.Position = Float3::Zero;
|
||||
data.CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data.Direction = -Direction;
|
||||
data.Radius = 0;
|
||||
data.FalloffExponent = 0;
|
||||
data.InverseSquared = 0;
|
||||
data.RadiusInv = 0;
|
||||
}
|
||||
|
||||
void RenderSpotLightData::SetupLightData(ShaderLightData* data, bool useShadow) const
|
||||
void RenderSpotLightData::SetShaderData(ShaderLightData& data, bool useShadow) const
|
||||
{
|
||||
data->SpotAngles.X = CosOuterCone;
|
||||
data->SpotAngles.Y = InvCosConeDifference;
|
||||
data->SourceRadius = SourceRadius;
|
||||
data->SourceLength = 0.0f;
|
||||
data->Color = Color;
|
||||
data->MinRoughness = Math::Max(MinRoughness, MIN_ROUGHNESS);
|
||||
data->Position = Position;
|
||||
data->CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data->Direction = Direction;
|
||||
data->Radius = Radius;
|
||||
data->FalloffExponent = FallOffExponent;
|
||||
data->InverseSquared = UseInverseSquaredFalloff ? 1.0f : 0.0f;
|
||||
data->RadiusInv = 1.0f / Radius;
|
||||
data.SpotAngles.X = CosOuterCone;
|
||||
data.SpotAngles.Y = InvCosConeDifference;
|
||||
data.SourceRadius = SourceRadius;
|
||||
data.SourceLength = 0.0f;
|
||||
data.Color = Color;
|
||||
data.MinRoughness = Math::Max(MinRoughness, MIN_ROUGHNESS);
|
||||
data.Position = Position;
|
||||
data.CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data.Direction = Direction;
|
||||
data.Radius = Radius;
|
||||
data.FalloffExponent = FallOffExponent;
|
||||
data.InverseSquared = UseInverseSquaredFalloff ? 1.0f : 0.0f;
|
||||
data.RadiusInv = 1.0f / Radius;
|
||||
}
|
||||
|
||||
void RenderPointLightData::SetupLightData(ShaderLightData* data, bool useShadow) const
|
||||
void RenderPointLightData::SetShaderData(ShaderLightData& data, bool useShadow) const
|
||||
{
|
||||
data->SpotAngles.X = -2.0f;
|
||||
data->SpotAngles.Y = 1.0f;
|
||||
data->SourceRadius = SourceRadius;
|
||||
data->SourceLength = SourceLength;
|
||||
data->Color = Color;
|
||||
data->MinRoughness = Math::Max(MinRoughness, MIN_ROUGHNESS);
|
||||
data->Position = Position;
|
||||
data->CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data->Direction = Direction;
|
||||
data->Radius = Radius;
|
||||
data->FalloffExponent = FallOffExponent;
|
||||
data->InverseSquared = UseInverseSquaredFalloff ? 1.0f : 0.0f;
|
||||
data->RadiusInv = 1.0f / Radius;
|
||||
data.SpotAngles.X = -2.0f;
|
||||
data.SpotAngles.Y = 1.0f;
|
||||
data.SourceRadius = SourceRadius;
|
||||
data.SourceLength = SourceLength;
|
||||
data.Color = Color;
|
||||
data.MinRoughness = Math::Max(MinRoughness, MIN_ROUGHNESS);
|
||||
data.Position = Position;
|
||||
data.CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data.Direction = Direction;
|
||||
data.Radius = Radius;
|
||||
data.FalloffExponent = FallOffExponent;
|
||||
data.InverseSquared = UseInverseSquaredFalloff ? 1.0f : 0.0f;
|
||||
data.RadiusInv = 1.0f / Radius;
|
||||
}
|
||||
|
||||
void RenderSkyLightData::SetupLightData(ShaderLightData* data, bool useShadow) const
|
||||
void RenderSkyLightData::SetShaderData(ShaderLightData& data, bool useShadow) const
|
||||
{
|
||||
data->SpotAngles.X = AdditiveColor.X;
|
||||
data->SpotAngles.Y = AdditiveColor.Y;
|
||||
data->SourceRadius = AdditiveColor.Z;
|
||||
data->SourceLength = Image ? Image->StreamingTexture()->TotalMipLevels() - 2.0f : 0.0f;
|
||||
data->Color = Color;
|
||||
data->MinRoughness = MIN_ROUGHNESS;
|
||||
data->Position = Position;
|
||||
data->CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data->Direction = Float3::Forward;
|
||||
data->Radius = Radius;
|
||||
data->FalloffExponent = 0;
|
||||
data->InverseSquared = 0;
|
||||
data->RadiusInv = 1.0f / Radius;
|
||||
data.SpotAngles.X = AdditiveColor.X;
|
||||
data.SpotAngles.Y = AdditiveColor.Y;
|
||||
data.SourceRadius = AdditiveColor.Z;
|
||||
data.SourceLength = Image ? Image->StreamingTexture()->TotalMipLevels() - 2.0f : 0.0f;
|
||||
data.Color = Color;
|
||||
data.MinRoughness = MIN_ROUGHNESS;
|
||||
data.Position = Position;
|
||||
data.CastShadows = useShadow ? 1.0f : 0.0f;
|
||||
data.Direction = Float3::Forward;
|
||||
data.Radius = Radius;
|
||||
data.FalloffExponent = 0;
|
||||
data.InverseSquared = 0;
|
||||
data.RadiusInv = 1.0f / Radius;
|
||||
}
|
||||
}
|
||||
|
||||
void* RendererAllocation::Allocate(uintptr size)
|
||||
|
||||
Reference in New Issue
Block a user