public override void FillShaderData(ref SPositionalLightShaderData data) { data.Position = new Vector4(Transform.WorldPosition, 1.0f); data.Direction = new Vector4(Transform.Forward, 1.0f); data.Color = LightColor; data.Range = Range; data.ConstantAttenuation = ConstantAttenuation; data.LinearAttenuation = LinearAttenuation; data.QuadraticAttenuation = QuadraticAttenuation; data.LightType = LightType; data.bEnabled = Enabled ? 1 : 0; data.bCastShadows = IsCastingShadows ? 1 : 0; data.shadowMapRegister = ShadowMapRegister; }
public override void FillShaderData(ref SPositionalLightShaderData data) { data.Position = new Vector4(Transform.WorldPosition, 1.0f); data.Direction = new Vector4(Transform.Forward, 1.0f); data.Color = LightColor; data.Range = Range; data.SpotAngle = SpotAngle; data.ConstantAttenuation = ConstantAttenuation; data.LinearAttenuation = LinearAttenuation; data.QuadraticAttenuation = QuadraticAttenuation; data.LightType = LightType; data.bEnabled = Enabled ? 1 : 0; data.bCastShadows = IsCastingShadows ? 1 : 0; data.shadowMapRegister = ShadowMapRegister; data.viewProjection = Matrix.Transpose(Matrix.Multiply(Matrix.Invert(Transform.WorldMatrix), m_projectionMatrix)); }
public abstract void FillShaderData(ref SPositionalLightShaderData data);