mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Trailing whitespaces removed.
This commit is contained in:
parent
6f5119a933
commit
24d32d57d6
18 changed files with 29 additions and 29 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -14,4 +14,4 @@ void main()
|
|||
{
|
||||
#include "fs_shadowmaps_color_lightning_main.sh"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue