public VSOutput VS(VSInput input) { return(new VSOutput() { Position = ShaderMath.Mul(Matrixs.MVP, new Vector4(input.Position, 1)), Color = input.Color }); }
public V2F VS(A2V a) { return(new V2F() { Position = ShaderMath.Mul(Matrixs.MVP, new Vector4(a.Position, 1)), UV = a.UV }); }
public V2F VS(A2V a) { Vector4 pos = ShaderMath.Mul(Matrixs.Entity2World, new Vector4(a.Position, 1)); return(new V2F { Position = ShaderMath.Mul(Matrixs.MVP, new Vector4(a.Position, 1)), WorldPosition = new Vector3(pos.X, pos.Y, pos.Z), Normal = Vector3.Normalize(ShaderMath.Mul(Matrixs.Entity2World, a.Normal)), }); }
public SSV2F VS(SSA2V a) { Vector4 pos = ShaderMath.Mul(Matrixs.Entity2World, a.Position.XYZ1()); Matrix3x3 rotation = new Matrix3x3(a.Tangent, a.Bitangent, a.Normal); return(new SSV2F { Position = ShaderMath.Mul(Matrixs.MVP, a.Position.XYZ1()), WorldPosition = new Vector3(pos.X, pos.Y, pos.Z), Normal = Vector3.Normalize(ShaderMath.Mul(Matrixs.Entity2World, a.Normal)), UV = a.UV, }); }