From a33514fa1db5d18cfa931bfc7fb57db362df53f6 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 1 Oct 2014 23:19:23 +0200 Subject: [PATCH] More shader compatibility fixes --- files/materials/atmosphere.shader | 12 ++++++------ files/materials/clouds.shader | 12 ++++++------ files/materials/moon.shader | 12 ++++++------ files/materials/sun.shader | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/files/materials/atmosphere.shader b/files/materials/atmosphere.shader index c8a8e0220..5040052fc 100644 --- a/files/materials/atmosphere.shader +++ b/files/materials/atmosphere.shader @@ -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; diff --git a/files/materials/clouds.shader b/files/materials/clouds.shader index 9e9b10256..90c4d0f84 100644 --- a/files/materials/clouds.shader +++ b/files/materials/clouds.shader @@ -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)); diff --git a/files/materials/moon.shader b/files/materials/moon.shader index a7d183d10..d369a1c68 100644 --- a/files/materials/moon.shader +++ b/files/materials/moon.shader @@ -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; diff --git a/files/materials/sun.shader b/files/materials/sun.shader index abe4c97f1..fc747b522 100644 --- a/files/materials/sun.shader +++ b/files/materials/sun.shader @@ -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;