Unified moon/star rendering to share same shader. Also now actually using deferred shader when performing deferred rendering.

This commit is contained in:
Shyotl
2012-12-19 01:52:10 -06:00
parent d3939c785d
commit 0460769eea
4 changed files with 64 additions and 40 deletions

View File

@@ -29,6 +29,8 @@ out vec4 frag_data[3];
#define frag_data gl_FragData
#endif
uniform float custom_alpha;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
@@ -38,7 +40,7 @@ void main()
{
vec4 col = vertex_color * texture2D(diffuseMap, vary_texcoord0.xy);
frag_data[0] = col;
frag_data[0] = vec4(col.rgb,col.a*custom_alpha);
frag_data[1] = vec4(0,0,0,0);
//#define PACK_NORMALS
#ifdef PACK_NORMALS