diff --git a/examples/16-shadowmaps/common.sh b/examples/16-shadowmaps/common.sh index 29785b94..b0b2d93d 100644 --- a/examples/16-shadowmaps/common.sh +++ b/examples/16-shadowmaps/common.sh @@ -61,7 +61,7 @@ Light evalLight(vec3 _v, vec4 _l, vec3 _spotDirection, float _spotInner, float _ light.ld = normalize(light.l); float ldotsd = max(0.0, dot(-light.ld, normalize(_spotDirection))); - float falloff = spot(ldotsd, _spotOuter, _spotInner); + float falloff = spot(ldotsd, _spotOuter, _spotInner); light.attn = attenuation(length(light.l), _attnParams) * mix(falloff, 1.0, step(90, _spotOuter)); } diff --git a/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh b/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh index c6adfa8b..1d0b28b8 100644 --- a/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh +++ b/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh @@ -12,7 +12,7 @@ uniform vec4 u_color; uniform vec3 u_materialKa; uniform vec3 u_materialKd; -uniform vec4 u_materialKs; +uniform vec4 u_materialKs; uniform vec4 u_lightPosition; uniform vec4 u_lightAmbientPower; uniform vec4 u_lightDiffusePower; @@ -45,7 +45,7 @@ Shader evalShader(float _diff, float _spec) { Shader shader; - shader.ambi = u_lightAmbientPower.xyz * u_lightAmbientPower.w * u_materialKa; + shader.ambi = u_lightAmbientPower.xyz * u_lightAmbientPower.w * u_materialKa; shader.diff = u_lightDiffusePower.xyz * u_lightDiffusePower.w * u_materialKd * _diff; shader.spec = u_lightSpecularPower.xyz * u_lightSpecularPower.w * u_materialKs.xyz * _spec; diff --git a/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh b/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh index fb8b9097..9b2aa738 100644 --- a/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh +++ b/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh @@ -107,7 +107,7 @@ float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.3; colorCoverage = vec3(-coverage, -coverage, coverage); } - else // (faceSelection.w == faceMax) + else // (faceSelection.w == faceMax) { shadowcoord = v_texcoord4; diff --git a/examples/16-shadowmaps/fs_shadowmaps_color_lightning_vsm_linear_csm.sc b/examples/16-shadowmaps/fs_shadowmaps_color_lightning_vsm_linear_csm.sc index 9b46fea2..2ac4a975 100644 --- a/examples/16-shadowmaps/fs_shadowmaps_color_lightning_vsm_linear_csm.sc +++ b/examples/16-shadowmaps/fs_shadowmaps_color_lightning_vsm_linear_csm.sc @@ -14,4 +14,4 @@ void main() { #include "fs_shadowmaps_color_lightning_main.sh" } - + diff --git a/examples/16-shadowmaps/vs_shadowmaps_color.sc b/examples/16-shadowmaps/vs_shadowmaps_color.sc index 8ad767cf..edf8b3c1 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_color.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_color.sc @@ -5,7 +5,7 @@ $input a_position * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_csm.sc b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_csm.sc index 254e1d76..34133076 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_csm.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_csm.sc @@ -1,15 +1,15 @@ $input a_position, a_normal -$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 +$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 /* * Copyright 2013 Dario Manesku. All rights reserved. * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" uniform vec4 u_params1; -#define u_shadowMapOffset u_params1.y +#define u_shadowMapOffset u_params1.y uniform mat4 u_lightMtx; uniform mat4 u_shadowMapMtx0; diff --git a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear.sc b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear.sc index 22a581b8..cb40301f 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear.sc @@ -1,4 +1,4 @@ -$input a_position, a_normal, a_texcoord0 +$input a_position, a_normal $output v_normal, v_view, v_shadowcoord /* @@ -6,11 +6,11 @@ $output v_normal, v_view, v_shadowcoord * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" uniform mat4 u_lightMtx; uniform vec4 u_params1; -#define u_shadowMapOffset u_params1.y +#define u_shadowMapOffset u_params1.y void main() { @@ -21,6 +21,6 @@ void main() v_view = mul(u_modelView, vec4(a_position, 1.0)).xyz; vec3 posOffset = a_position + normal.xyz * u_shadowMapOffset; - v_shadowcoord = mul(u_lightMtx, vec4(posOffset, 1.0) ); + v_shadowcoord = mul(u_lightMtx, vec4(posOffset, 1.0) ); v_shadowcoord.z += 0.5; } diff --git a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_csm.sc b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_csm.sc index 74a0fce8..6bcf411f 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_csm.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_csm.sc @@ -1,15 +1,15 @@ $input a_position, a_normal -$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 +$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 /* * Copyright 2013 Dario Manesku. All rights reserved. * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" uniform vec4 u_params1; -#define u_shadowMapOffset u_params1.y +#define u_shadowMapOffset u_params1.y uniform mat4 u_lightMtx; uniform mat4 u_shadowMapMtx0; diff --git a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_omni.sc b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_omni.sc index 6cdb68d7..cfec102c 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_omni.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_linear_omni.sc @@ -1,15 +1,15 @@ $input a_position, a_normal -$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 +$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 /* * Copyright 2013 Dario Manesku. All rights reserved. * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" uniform vec4 u_params1; -#define u_shadowMapOffset u_params1.y +#define u_shadowMapOffset u_params1.y uniform mat4 u_lightMtx; uniform mat4 u_shadowMapMtx0; diff --git a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_omni.sc b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_omni.sc index 464bd466..8150c41f 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_color_lightning_omni.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_color_lightning_omni.sc @@ -1,15 +1,15 @@ $input a_position, a_normal -$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 +$output v_position, v_normal, v_view, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 /* * Copyright 2013 Dario Manesku. All rights reserved. * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" uniform vec4 u_params1; -#define u_shadowMapOffset u_params1.y +#define u_shadowMapOffset u_params1.y uniform mat4 u_lightMtx; uniform mat4 u_shadowMapMtx0; diff --git a/examples/16-shadowmaps/vs_shadowmaps_color_texture.sc b/examples/16-shadowmaps/vs_shadowmaps_color_texture.sc index 1276312f..5a646fab 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_color_texture.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_color_texture.sc @@ -6,7 +6,7 @@ $output v_texcoord0 * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/16-shadowmaps/vs_shadowmaps_depth.sc b/examples/16-shadowmaps/vs_shadowmaps_depth.sc index 25ccd241..f882005c 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_depth.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_depth.sc @@ -5,7 +5,7 @@ $input a_position * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/16-shadowmaps/vs_shadowmaps_packdepth.sc b/examples/16-shadowmaps/vs_shadowmaps_packdepth.sc index d6e7c461..dc1024b6 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_packdepth.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_packdepth.sc @@ -6,7 +6,7 @@ $output v_position * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/16-shadowmaps/vs_shadowmaps_packdepth_linear.sc b/examples/16-shadowmaps/vs_shadowmaps_packdepth_linear.sc index 1286d7dc..2e188e33 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_packdepth_linear.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_packdepth_linear.sc @@ -6,7 +6,7 @@ $output v_depth * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/16-shadowmaps/vs_shadowmaps_texture.sc b/examples/16-shadowmaps/vs_shadowmaps_texture.sc index 1276312f..5a646fab 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_texture.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_texture.sc @@ -6,7 +6,7 @@ $output v_texcoord0 * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/16-shadowmaps/vs_shadowmaps_texture_lightning.sc b/examples/16-shadowmaps/vs_shadowmaps_texture_lightning.sc index 1925aa64..1fcd73ba 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_texture_lightning.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_texture_lightning.sc @@ -6,7 +6,7 @@ $output v_normal, v_view, v_texcoord0 * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/16-shadowmaps/vs_shadowmaps_unpackdepth.sc b/examples/16-shadowmaps/vs_shadowmaps_unpackdepth.sc index 1276312f..5a646fab 100644 --- a/examples/16-shadowmaps/vs_shadowmaps_unpackdepth.sc +++ b/examples/16-shadowmaps/vs_shadowmaps_unpackdepth.sc @@ -6,7 +6,7 @@ $output v_texcoord0 * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include "../common/common.sh" +#include "../common/common.sh" void main() { diff --git a/examples/runtime/shaders/dx11/vs_shadowmaps_color_lightning_linear.bin b/examples/runtime/shaders/dx11/vs_shadowmaps_color_lightning_linear.bin index 289e2d9f..82007af1 100644 Binary files a/examples/runtime/shaders/dx11/vs_shadowmaps_color_lightning_linear.bin and b/examples/runtime/shaders/dx11/vs_shadowmaps_color_lightning_linear.bin differ