shadow
This commit is contained in:
parent
b9f4b88381
commit
8ea9cdf08c
8 changed files with 108 additions and 43 deletions
|
|
@ -2,7 +2,18 @@
|
|||
|
||||
uniform sampler2DShadow texture;
|
||||
varying vec4 shadow;
|
||||
|
||||
varying vec4 color;
|
||||
uniform float solid_color;
|
||||
uniform sampler2D texture_in;
|
||||
|
||||
void main (void){
|
||||
gl_FragColor = shadow + (gl_Color - shadow) * shadow2DProj(texture, gl_TexCoord[0]);
|
||||
vec4 c;
|
||||
|
||||
if(solid_color > 0.5){
|
||||
c = color;
|
||||
}else{
|
||||
c = texture2D(texture_in, gl_TexCoord[1].st);
|
||||
}
|
||||
|
||||
gl_FragColor = (shadow + (gl_Color - shadow) * shadow2DProj(texture, gl_TexCoord[0])) * c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue