Merge branch 'master' of git://github.com/Shyotl/SingularityViewer
This commit is contained in:
@@ -41,10 +41,6 @@ void main()
|
|||||||
|
|
||||||
|
|
||||||
vec4 p = projection_matrix * vec4(pos, 1.0);
|
vec4 p = projection_matrix * vec4(pos, 1.0);
|
||||||
#if !DEPTH_CLAMP
|
|
||||||
p.z = max(p.z, -p.w+0.01);
|
p.z = max(p.z, -p.w+0.01);
|
||||||
gl_Position = p;
|
gl_Position = p;
|
||||||
#else
|
|
||||||
gl_Position = p;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,10 +169,12 @@ void main()
|
|||||||
#ifndef HAS_ALPHA_MASK
|
#ifndef HAS_ALPHA_MASK
|
||||||
color.a = fogged.a;
|
color.a = fogged.a;
|
||||||
#endif
|
#endif
|
||||||
#elif !HAS_ALPHA_MASK
|
#else
|
||||||
|
#ifndef HAS_ALPHA_MASK
|
||||||
color.a = final_alpha;
|
color.a = final_alpha;
|
||||||
#endif
|
#endif
|
||||||
#if HAS_ALPHA_MASK
|
#endif
|
||||||
|
#ifdef HAS_ALPHA_MASK
|
||||||
color.a = 0.0;
|
color.a = 0.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ uniform sampler2DShadow shadowMap1;
|
|||||||
uniform sampler2DShadow shadowMap2;
|
uniform sampler2DShadow shadowMap2;
|
||||||
uniform sampler2DShadow shadowMap3;
|
uniform sampler2DShadow shadowMap3;
|
||||||
uniform sampler2D noiseMap;
|
uniform sampler2D noiseMap;
|
||||||
|
VARYING vec2 vary_fragcoord;
|
||||||
|
|
||||||
uniform mat4 shadow_matrix[6];
|
uniform mat4 shadow_matrix[6];
|
||||||
uniform vec4 shadow_clip;
|
uniform vec4 shadow_clip;
|
||||||
@@ -135,7 +136,6 @@ uniform mat3 env_mat;
|
|||||||
uniform mat3 ssao_effect_mat;
|
uniform mat3 ssao_effect_mat;
|
||||||
|
|
||||||
uniform vec3 sun_dir;
|
uniform vec3 sun_dir;
|
||||||
VARYING vec2 vary_fragcoord;
|
|
||||||
|
|
||||||
VARYING vec3 vary_position;
|
VARYING vec3 vary_position;
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ uniform mat4 modelview_matrix;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
VARYING vec3 vary_position;
|
VARYING vec3 vary_position;
|
||||||
|
#if HAS_SUN_SHADOW
|
||||||
|
VARYING vec2 vary_fragcoord;
|
||||||
|
uniform vec2 screen_res;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -138,7 +142,11 @@ vary_normal = n;
|
|||||||
|
|
||||||
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
|
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
|
||||||
#if !HAS_SKIN
|
#if !HAS_SKIN
|
||||||
vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
|
vec3 pos = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
|
||||||
|
vary_position = pos;
|
||||||
|
#endif
|
||||||
|
#if HAS_SUN_SHADOW
|
||||||
|
vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user