Shader fixes for Delta Touch.
This commit is contained in:
parent
c6479cbbc6
commit
db6eced213
5 changed files with 16 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
|||
vec4 ProcessTexel()
|
||||
{
|
||||
const vec3 fadecol = vec3(.9,.1,.2);
|
||||
vec2 coord = vTexCoord.st+vec2(timer*0.02,0.);
|
||||
vec2 coord = vTexCoord.st+vec2(timer*.02,0.);
|
||||
coord = fract(coord);
|
||||
vec3 base = getTexel(coord).rgb;
|
||||
float dist = abs(vTexCoord.s-.5)*2.;
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@ vec4 ProcessTexel()
|
|||
{
|
||||
vec2 uv = vTexCoord.st;
|
||||
uv.x += 1.;
|
||||
float ang = timer*0.05;
|
||||
float ang = timer*.05;
|
||||
vec2 uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.3;
|
||||
vec3 col = getTexel(fract(uv2)).rgb;
|
||||
uv.y -= 2.;
|
||||
ang = timer*0.03;
|
||||
ang = timer*.03;
|
||||
uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.5;
|
||||
col += getTexel(fract(uv2)).rgb;
|
||||
uv.x -= 3.;
|
||||
ang = timer*0.04;
|
||||
ang = timer*.04;
|
||||
uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.6;
|
||||
col += getTexel(fract(uv2)).rgb;
|
||||
uv.y += 4.;
|
||||
ang = timer*0.02;
|
||||
ang = timer*.02;
|
||||
uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.2;
|
||||
col += getTexel(fract(uv2)).rgb;
|
||||
col *= 0.25;
|
||||
col *= .25;
|
||||
return vec4(col,1.);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
vec4 ProcessTexel()
|
||||
{
|
||||
vec2 ccoord = vTexCoord.st-vec2(.5);
|
||||
if ( ccoord.y < 0 ) ccoord.x *= -1.;
|
||||
if ( ccoord.y < 0. ) ccoord.x *= -1.;
|
||||
ccoord.y = abs(ccoord.y);
|
||||
vec3 pt = vec3(ccoord.x,ccoord.y-1.,ccoord.y);
|
||||
vec2 proj = pt.xy/pt.z;
|
||||
|
|
@ -13,7 +13,7 @@ vec4 ProcessTexel()
|
|||
coord = proj*.123234+vec2(0.,-1.)*timer*.092346;
|
||||
coord = fract(coord);
|
||||
col += getTexel(coord).rgb;
|
||||
coord = proj*.145463+vec2(0.3,-1.)*timer*.093242;
|
||||
coord = proj*.145463+vec2(.3,-1.)*timer*.093242;
|
||||
coord = fract(coord);
|
||||
col += getTexel(coord).rgb;
|
||||
col *= vec3(1.2,.4,.8);
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ vec4 ProcessTexel()
|
|||
float mask = texture(masktex,vTexCoord.st).x;
|
||||
vec3 eyedir = normalize(uCameraPos.xyz-pixelpos.xyz);
|
||||
vec3 norm = reflect(eyedir,normalize(vWorldNormal.xyz));
|
||||
return vec4(base.rgb+texture(envtex,norm.xz*0.5+0.5).rgb*mask,base.a);
|
||||
return vec4(base.rgb+texture(envtex,norm.xz*.5+.5).rgb*mask,base.a);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ vec4 ProcessLight( vec4 color )
|
|||
if ( gs.x > .5 ) return color;
|
||||
if ( gs.y > .5 )
|
||||
{
|
||||
float glow = max(0.,sin(timer*4)-.5);
|
||||
float glow = max(0.,sin(timer*4.)-.5);
|
||||
return vec4(min(color.rgb+vec3(glow),1.),color.a);
|
||||
}
|
||||
float glow = 0.25+0.2*sin(timer*8);
|
||||
return vec4(min(color.rgb+vec3(glow),1.0),color.a);
|
||||
float glow = .25+.2*sin(timer*8.);
|
||||
return vec4(min(color.rgb+vec3(glow),1.),color.a);
|
||||
}
|
||||
|
||||
// imitation of the Unreal Engine 1.x bMeshEnviroMap effect, not 1:1 but gets close
|
||||
|
|
@ -21,12 +21,12 @@ vec4 ProcessTexel()
|
|||
vec3 eyedir = normalize(uCameraPos.xyz-pixelpos.xyz);
|
||||
vec3 norm = reflect(eyedir,normalize(vWorldNormal.xyz));
|
||||
vec2 gs = texture(ambglow,vec2(.5)).xy;
|
||||
if ( gs.x > .5 ) return vec4(base.rgb+texture(envtex,norm.xz*0.5+0.5).rgb*mask,base.a);
|
||||
if ( gs.x > .5 ) return vec4(base.rgb+texture(envtex,norm.xz*.5+.5).rgb*mask,base.a);
|
||||
if ( gs.y > .5 )
|
||||
{
|
||||
float glow = max(0.,sin(timer*4)-.5);
|
||||
vec3 col = base.rgb+texture(envtex,norm.xz*0.5+0.5).rgb*mask;
|
||||
float glow = max(0.,sin(timer*4.)-.5);
|
||||
vec3 col = base.rgb+texture(envtex,norm.xz*.5+.5).rgb*mask;
|
||||
return vec4(min(col+vec3(glow),1.),base.a);
|
||||
}
|
||||
return vec4(base.rgb+texture(envtex,norm.xz*0.5+0.5).rgb*mask,base.a);
|
||||
return vec4(base.rgb+texture(envtex,norm.xz*.5+.5).rgb*mask,base.a);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue