diff --git a/Shaders/std/shadows.glsl b/Shaders/std/shadows.glsl index 68f48e26..5a7769fb 100755 --- a/Shaders/std/shadows.glsl +++ b/Shaders/std/shadows.glsl @@ -84,7 +84,7 @@ mat4 getCascadeMat(const float d, out int casi, out int casIndex) { casIndex = casi * 4; return mat4( - casData[casIndex + 0], + casData[casIndex ], casData[casIndex + 1], casData[casIndex + 2], casData[casIndex + 3]); @@ -121,7 +121,7 @@ float shadowTestCascade(sampler2DShadow shadowMap, const vec3 eye, const vec3 p, if (splitDist <= blendThres && casi != c - 1) { int casIndex2 = casIndex + 4; mat4 LWVP2 = mat4( - casData[casIndex2 + 0], + casData[casIndex2 ], casData[casIndex2 + 1], casData[casIndex2 + 2], casData[casIndex2 + 3]); diff --git a/Shaders/volumetric_light/volumetric_light.frag.glsl b/Shaders/volumetric_light/volumetric_light.frag.glsl index f9d74eec..91cb42c0 100644 --- a/Shaders/volumetric_light/volumetric_light.frag.glsl +++ b/Shaders/volumetric_light/volumetric_light.frag.glsl @@ -92,7 +92,7 @@ void rayStep(inout vec3 curPos, inout float curOpticalDepth, inout float scatter #ifdef _Sun #ifdef _CSM - mat4 LWVP = mat4(casData[4 + 0], casData[4 + 1], casData[4 + 2], casData[4 + 3]); + mat4 LWVP = mat4(casData[4], casData[4 + 1], casData[4 + 2], casData[4 + 3]); #endif vec4 lPos = LWVP * vec4(curPos, 1.0); lPos.xyz /= lPos.w; diff --git a/Sources/armory/renderpath/HosekWilkie.hx b/Sources/armory/renderpath/HosekWilkie.hx index 3c3d0319..b3a2b4de 100644 --- a/Sources/armory/renderpath/HosekWilkie.hx +++ b/Sources/armory/renderpath/HosekWilkie.hx @@ -21,7 +21,7 @@ class HosekWilkieRadianceData { function evaluateSpline(spline:Array, index:Int, stride:Int, value:Float):Float { return - 1 * Math.pow(1 - value, 5) * spline[index + 0 * stride] + + 1 * Math.pow(1 - value, 5) * spline[index * stride] + 5 * Math.pow(1 - value, 4) * Math.pow(value, 1) * spline[index + 1 * stride] + 10 * Math.pow(1 - value, 3) * Math.pow(value, 2) * spline[index + 2 * stride] + 10 * Math.pow(1 - value, 2) * Math.pow(value, 3) * spline[index + 3 * stride] + diff --git a/Sources/armory/trait/internal/DebugDraw.hx b/Sources/armory/trait/internal/DebugDraw.hx index 94114731..7913d093 100644 --- a/Sources/armory/trait/internal/DebugDraw.hx +++ b/Sources/armory/trait/internal/DebugDraw.hx @@ -143,7 +143,7 @@ class DebugDraw { l.add(camera.up()); var i = lines * 24; // 4 * 6 (structure len) - vbData.set(i + 0, x1); + vbData.set(i , x1); vbData.set(i + 1, y1); vbData.set(i + 2, z1); vbData.set(i + 3, color.R); @@ -172,12 +172,12 @@ class DebugDraw { vbData.set(i + 23, color.B); i = lines * 6; - ibData[i + 0] = lines * 4 + 0; + ibData[i ] = lines * 4; ibData[i + 1] = lines * 4 + 1; ibData[i + 2] = lines * 4 + 2; ibData[i + 3] = lines * 4 + 2; ibData[i + 4] = lines * 4 + 3; - ibData[i + 5] = lines * 4 + 0; + ibData[i + 5] = lines * 4; lines++; }