More shader compatibility fixes

This commit is contained in:
scrawl 2014-10-01 23:19:23 +02:00
parent 1c51694aa9
commit a33514fa1d
4 changed files with 24 additions and 24 deletions

View file

@ -12,13 +12,13 @@
{
float4x4 viewFixed = view;
#if !SH_GLSL
viewFixed[0][3] = 0;
viewFixed[1][3] = 0;
viewFixed[2][3] = 0;
viewFixed[0][3] = 0.0;
viewFixed[1][3] = 0.0;
viewFixed[2][3] = 0.0;
#else
viewFixed[3][0] = 0;
viewFixed[3][1] = 0;
viewFixed[3][2] = 0;
viewFixed[3][0] = 0.0;
viewFixed[3][1] = 0.0;
viewFixed[3][2] = 0.0;
#endif
shOutputPosition = shMatrixMult(projection, shMatrixMult(viewFixed, shInputPosition));
alphaFade = shInputPosition.z < 150.0 ? 0.0 : 1.0;

View file

@ -14,13 +14,13 @@
float4x4 worldviewFixed = worldview;
#if !SH_GLSL
worldviewFixed[0][3] = 0;
worldviewFixed[1][3] = 0;
worldviewFixed[2][3] = 0;
worldviewFixed[0][3] = 0.0;
worldviewFixed[1][3] = 0.0;
worldviewFixed[2][3] = 0.0;
#else
worldviewFixed[3][0] = 0;
worldviewFixed[3][1] = 0;
worldviewFixed[3][2] = 0;
worldviewFixed[3][0] = 0.0;
worldviewFixed[3][1] = 0.0;
worldviewFixed[3][2] = 0.0;
#endif
shOutputPosition = shMatrixMult(proj, shMatrixMult(worldviewFixed, shInputPosition));

View file

@ -13,13 +13,13 @@ shUniform(float4x4, projection) @shAutoConstant(projection, projection_matrix)
{
float4x4 viewFixed = view;
#if !SH_GLSL
viewFixed[0][3] = 0;
viewFixed[1][3] = 0;
viewFixed[2][3] = 0;
viewFixed[0][3] = 0.0;
viewFixed[1][3] = 0.0;
viewFixed[2][3] = 0.0;
#else
viewFixed[3][0] = 0;
viewFixed[3][1] = 0;
viewFixed[3][2] = 0;
viewFixed[3][0] = 0.0;
viewFixed[3][1] = 0.0;
viewFixed[3][2] = 0.0;
#endif
shOutputPosition = shMatrixMult(projection, shMatrixMult(viewFixed, shMatrixMult(world, shInputPosition)));
UV = uv0;

View file

@ -13,13 +13,13 @@ shUniform(float4x4, projection) @shAutoConstant(projection, projection_matrix)
{
float4x4 viewFixed = view;
#if !SH_GLSL
viewFixed[0][3] = 0;
viewFixed[1][3] = 0;
viewFixed[2][3] = 0;
viewFixed[0][3] = 0.0;
viewFixed[1][3] = 0.0;
viewFixed[2][3] = 0.0;
#else
viewFixed[3][0] = 0;
viewFixed[3][1] = 0;
viewFixed[3][2] = 0;
viewFixed[3][0] = 0.0;
viewFixed[3][1] = 0.0;
viewFixed[3][2] = 0.0;
#endif
shOutputPosition = shMatrixMult(projection, shMatrixMult(viewFixed, shMatrixMult(world, shInputPosition)));
UV = uv0;