public void MainVS() { Vector4 loc = Transform.Multiply(new Vector4(Position_VS, 1)); Position_VSPS = Camera.Multiply(loc); Normal_VSPS = Transform.Multiply(new Vector4(Normal_VS, 0)).xyz; UV_VSPS = new Vector2(UV_VS.x, 1.0-UV_VS.y); }
public void MainVS() { Vector3 loc = new Vector3((Position_VS * Size) + Position, 0); Position_VSPS = Camera.Multiply(new Vector4(loc, 1.0)); Vector2 uv = Position_VS + TexelOffset; UV_VSPS = (new Vector2(uv.x, 1.0-uv.y) * SizeUV) + PositionUV; }
public void MainVS() { Vector4 loc = Transform.Multiply(new Vector4(Position_VS, 1)); Position_VSPS = Camera.Multiply(loc); UV_VSPS = new Vector2(UV_VS.x, 1.0-UV_VS.y); Vector3 normal = SL.Normalize(Transform.MultiplyInvert(new Vector4(Normal_VS, 0)).xyz); double light = SL.Max(SL.Dot(-LightDirection, normal), 0.0); double light2 = SL.Max(SL.Dot(-LightDirection2, normal), 0.0); Light_VSPS = ((light * LightColor) + (light2 * LightColor2)); }
public void MainVS() { Vector3 loc = new Vector3((Position_VS * Size) + Position, 0); Position_VSPS = Camera.Multiply(new Vector4(loc, 1.0)); UV_VSPS = new Vector2(Position_VS.x, 1.0-Position_VS.y) + TexelOffset; }
public void MainVS() { Vector4 loc = BillboardTransform.Multiply(new Vector4(Position_VS, 1)); Position_VSPS = Camera.Multiply(loc); UV_VSPS = new Vector2(UV_VS.x, 1.0-UV_VS.y); }