Catching up with Lindies part 2

This commit is contained in:
Siana Gearz
2012-03-25 09:38:36 +02:00
parent 196e9d6c78
commit 3f0f955a76
113 changed files with 801 additions and 516 deletions

View File

@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
VARYING vec4 vertex_color;
@@ -125,6 +127,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
gl_FragColor = color;
frag_color = color;
}

View File

@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
uniform sampler2DRectShadow shadowMap0;
@@ -138,6 +140,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
gl_FragColor = color;
frag_color = color;
}

View File

@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
uniform sampler2DRectShadow shadowMap0;
@@ -137,6 +139,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
gl_FragColor = color;
frag_color = color;
}

View File

@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
uniform sampler2DRect diffuseRect;
@@ -253,6 +255,6 @@ void main()
}
}
gl_FragColor.rgb = col;
gl_FragColor.a = 0.0;
frag_color.rgb = col;
frag_color.a = 0.0;
}

View File

@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
uniform sampler2DRect diffuseRect;
@@ -330,6 +332,6 @@ void main()
col = diffuse.rgb;
}
gl_FragColor.rgb = col;
gl_FragColor.a = bloom;
frag_color.rgb = col;
frag_color.a = bloom;
}

View File

@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
VARYING vec4 vertex_color;
@@ -201,6 +203,6 @@ void main()
}
}
gl_FragColor.rgb = col;
gl_FragColor.a = 0.0;
frag_color.rgb = col;
frag_color.a = 0.0;
}

View File

@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
//class 2, shadows, no SSAO
@@ -129,7 +131,7 @@ void main()
/*if (pos.z == 0.0) // do nothing for sky *FIX: REMOVE THIS IF/WHEN THE POSITION MAP IS BEING USED AS A STENCIL
{
gl_FragColor = vec4(0.0); // doesn't matter
frag_color = vec4(0.0); // doesn't matter
return;
}*/
@@ -198,19 +200,19 @@ void main()
shadow = 1.0;
}
gl_FragColor[0] = shadow;
gl_FragColor[1] = 1.0;
frag_color[0] = shadow;
frag_color[1] = 1.0;
spos = vec4(shadow_pos+norm*spot_shadow_offset, 1.0);
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
gl_FragColor[2] = pcfShadow(shadowMap4, lpos, 0.8);
frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
gl_FragColor[3] = pcfShadow(shadowMap5, lpos, 0.8);
frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8);
//gl_FragColor.rgb = pos.xyz;
//gl_FragColor.b = shadow;
//frag_color.rgb = pos.xyz;
//frag_color.b = shadow;
}

View File

@@ -25,7 +25,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
//class 2 -- shadows and SSAO
@@ -190,7 +192,7 @@ void main()
/*if (pos.z == 0.0) // do nothing for sky *FIX: REMOVE THIS IF/WHEN THE POSITION MAP IS BEING USED AS A STENCIL
{
gl_FragColor = vec4(0.0); // doesn't matter
frag_color = vec4(0.0); // doesn't matter
return;
}*/
@@ -259,19 +261,19 @@ void main()
shadow = 1.0;
}
gl_FragColor[0] = shadow;
gl_FragColor[1] = calcAmbientOcclusion(pos, norm);
frag_color[0] = shadow;
frag_color[1] = calcAmbientOcclusion(pos, norm);
spos = vec4(shadow_pos+norm*spot_shadow_offset, 1.0);
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
gl_FragColor[2] = pcfShadow(shadowMap4, lpos, 0.8);
frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
gl_FragColor[3] = pcfShadow(shadowMap5, lpos, 0.8);
frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8);
//gl_FragColor.rgb = pos.xyz;
//gl_FragColor.b = shadow;
//frag_color.rgb = pos.xyz;
//frag_color.b = shadow;
}

View File

@@ -24,7 +24,9 @@
*/
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
/////////////////////////////////////////////////////////////////////////
@@ -96,7 +98,7 @@ void main()
color *= 2.;
/// Gamma correct for WL (soft clip effect).
gl_FragColor.rgb = scaleSoftClip(color.rgb);
gl_FragColor.a = alpha1;
frag_color.rgb = scaleSoftClip(color.rgb);
frag_color.a = alpha1;
}

View File

@@ -24,7 +24,9 @@
*/
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
/////////////////////////////////////////////////////////////////////////
@@ -57,7 +59,7 @@ void main()
color *= 2.;
/// Gamma correct for WL (soft clip effect).
gl_FragColor.rgb = scaleSoftClip(color.rgb);
gl_FragColor.a = 1.0;
frag_color.rgb = scaleSoftClip(color.rgb);
frag_color.a = 1.0;
}