math functions
This commit is contained in:
parent
0cef6840af
commit
9d11089a75
15 changed files with 265 additions and 47 deletions
|
|
@ -1,10 +1,10 @@
|
|||
#version 110
|
||||
|
||||
uniform sampler2DShadow texture;
|
||||
uniform sampler2DShadow depth_texture;
|
||||
varying vec4 shadow;
|
||||
varying vec4 color;
|
||||
uniform float solid_color;
|
||||
uniform sampler2D texture_in;
|
||||
uniform sampler2D current_texture;
|
||||
|
||||
void main (void){
|
||||
vec4 c;
|
||||
|
|
@ -12,8 +12,8 @@ void main (void){
|
|||
if(solid_color > 0.5){
|
||||
c = color;
|
||||
}else{
|
||||
c = texture2D(texture_in, gl_TexCoord[1].st);
|
||||
c = texture2D(current_texture, gl_TexCoord[1].st);
|
||||
}
|
||||
|
||||
gl_FragColor = (shadow + (gl_Color - shadow) * shadow2DProj(texture, gl_TexCoord[0])) * c;
|
||||
gl_FragColor = (shadow + (gl_Color - shadow) * shadow2DProj(depth_texture, gl_TexCoord[0])) * c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue