コード例 #1
0
 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;
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 public abstract void FillShaderData(ref SPositionalLightShaderData data);