1.3.1 update. compatibility w/ newer versions of source ports.

This commit is contained in:
Marisa the Magician 2025-11-01 13:49:28 +01:00
commit 23c58058f3
23 changed files with 69 additions and 140 deletions

View file

@ -1,11 +1,11 @@
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
const vec3 fadecol = vec3(.9,.1,.2);
vec2 coord = vTexCoord.st+vec2(timer*.02,0.);
coord = fract(coord);
vec3 base = getTexel(coord).rgb;
float dist = abs(vTexCoord.s-.5)*2.;
vec3 col = mix(vec3(1.),fadecol,vec3(min(1.,dist*1.3)));
col = mix(col,vec3(0.),vec3(min(1.,dist)));
return vec4(base*col,1.);
mat.Base = vec4(base*col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,22 +1,23 @@
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.x += 1.;
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;
vec3 col = getTexel(uv2).rgb;
uv.y -= 2.;
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;
col += getTexel(uv2).rgb;
uv.x -= 3.;
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;
col += getTexel(uv2).rgb;
uv.y += 4.;
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 += getTexel(uv2).rgb;
col *= .25;
return vec4(col,1.);
mat.Base = vec4(col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,4 +1,4 @@
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 ccoord = vTexCoord.st-vec2(.5);
if ( ccoord.y < 0. ) ccoord.x *= -1.;
@ -8,16 +8,14 @@ vec4 ProcessTexel()
vec2 coord;
vec3 col = vec3(0.);
coord = proj*.142536+vec2(-.3,-1.)*timer*.0925436;
coord = fract(coord);
col += getTexel(coord).rgb;
coord = proj*.123234+vec2(0.,-1.)*timer*.092346;
coord = fract(coord);
col += getTexel(coord).rgb;
coord = proj*.145463+vec2(.3,-1.)*timer*.093242;
coord = fract(coord);
col += getTexel(coord).rgb;
col *= vec3(1.2,.4,.8);
col += vec3(.9,.7,1.6)*pow(max(1.2-abs(ccoord.y)*2.4,0.),6.);
col = clamp(col,vec3(0.),vec3(1.));
return vec4(col,1.);
mat.Base = vec4(col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -33,7 +33,7 @@ float fbm(vec2 uv)
return f;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
@ -47,5 +47,6 @@ vec4 ProcessTexel()
c1=clamp(c1,0.,1.);
vec3 col = vec3(c1*c1*c1*c1, 1.2*c1*c1*c1, 2.2*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
mat.Base = pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -33,7 +33,7 @@ float fbm(vec2 uv)
return f;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
@ -47,5 +47,6 @@ vec4 ProcessTexel()
c1=clamp(c1,0.,1.);
vec3 col = vec3(1.8*c1*c1*c1, 1.2*c1*c1*c1*c1, 2.2*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
mat.Base = pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -33,7 +33,7 @@ float fbm(vec2 uv)
return f;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
@ -47,5 +47,6 @@ vec4 ProcessTexel()
c1=clamp(c1,0.,1.);
vec3 col = vec3(2.5*c1*c1, 1.2*c1*c1*c1, c1*c1*c1*c1*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
mat.Base = pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,4 +1,4 @@
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.x += 1.;
@ -18,5 +18,6 @@ vec4 ProcessTexel()
uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.2;
col += getTexel(fract(uv2));
col *= .5;
return col;
mat.Base = col;
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -33,7 +33,7 @@ float fbm(vec2 uv)
return f;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
@ -46,5 +46,6 @@ vec4 ProcessTexel()
float c1 = n * c * (1.5-pow(1.25*uv.y,4.));
c1=clamp(c1,0.,1.);
vec3 col = vec3(c1*c1*c1*c1,1.2*c1*c1*c1,1.7*c1*c1);
return vec4(col,1.0);
mat.Base = vec4(col,1.0);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -33,7 +33,7 @@ float fbm(vec2 uv)
return f;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
@ -48,5 +48,6 @@ vec4 ProcessTexel()
c1=clamp(c1,0.,1.);
vec3 col = vec3(1.5*c1, c1*c1*c1, c1*c1*c1*c1*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return vec4( mix(vec3(0.),col,a), 1.0);
mat.Base = vec4( mix(vec3(0.),col,a), 1.0);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -25,7 +25,7 @@ vec2 hash22(vec2 p)
return fract((p3.xx+p3.yz)*p3.zy);
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 resolution = vec2(3.,6.);
vec2 uv = vTexCoord.st*resolution;
@ -54,5 +54,6 @@ vec4 ProcessTexel()
vec3 n = vec3(dFdx(circles), dFdy(circles), 0.);
n.z = sqrt(1. - dot(n.xy, n.xy));
vec3 color = getTexel(uv/resolution - intensity*n.xy).rgb + 5.*pow(clamp(dot(n, normalize(vec3(1., 0.7, 0.5))), 0., 1.), 6.);
return vec4(color, 1.0);
mat.Base = vec4(color, 1.0);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -33,7 +33,7 @@ float fbm(vec2 uv)
return f;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
@ -48,5 +48,6 @@ vec4 ProcessTexel()
c1=clamp(c1,0.,1.);
vec3 col = vec3(c1*c1*c1, 1.5*c1, c1*c1*c1*c1*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return vec4( mix(vec3(0.),col,a), 1.0);
mat.Base = vec4( mix(vec3(0.),col,a), 1.0);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,9 +1,10 @@
// imitation of the Unreal Engine 1.x bMeshEnviroMap effect, not 1:1 but gets close
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec4 base = getTexel(vTexCoord.st);
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*.5+.5).rgb*mask,base.a);
mat.Base = vec4(base.rgb+texture(envtex,norm.xz*.5+.5).rgb*mask,base.a);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,32 +1,16 @@
// imitation of the Unreal Engine 1.x ambient glow effect
vec4 ProcessLight( vec4 color )
{
vec2 gs = texture(ambglow,vec2(.5)).xy;
if ( gs.x > .5 ) return color;
if ( gs.y > .5 )
{
float glow = max(0.,sin(timer*4.)-.5);
return vec4(min(color.rgb+vec3(glow),1.),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
// +
// imitation of the Unreal Engine 1.x ambient glow effect
// with the addition of a mask for blending the environment map with the base texture
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec4 base = getTexel(vTexCoord.st);
float mask = texture(masktex,vTexCoord.st).x;
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*.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*.5+.5).rgb*mask;
return vec4(min(col+vec3(glow),1.),base.a);
}
return vec4(base.rgb+texture(envtex,norm.xz*.5+.5).rgb*mask,base.a);
mat.Base = vec4(base.rgb+texture(envtex,norm.xz*.5+.5).rgb*mask,base.a);
float glow = .25+.2*sin(timer*8.);
mat.Bright = vec4(vec3(glow),1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -10,10 +10,11 @@ vec3 bolt( in vec2 uv, in float speed, in float freq )
return col;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec3 col = bolt(vTexCoord.st,2.53534,0.21);
col += bolt(vTexCoord.st,2.64563,0.32);
col += bolt(vTexCoord.st,2.73425,0.43);
return vec4(col,1.);
mat.Base = vec4(col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -10,10 +10,11 @@ vec3 bolt( in vec2 uv, in float speed, in float freq )
return col;
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec3 col = bolt(vTexCoord.st,1.53534,0.51);
col += bolt(vTexCoord.st,1.64563,0.62);
col += bolt(vTexCoord.st,1.73425,0.73);
return vec4(col,1.);
mat.Base = vec4(col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,9 +1,10 @@
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec3 base = getTexel(vTexCoord.st).rgb;
vec2 scroll = vTexCoord.st*.5+vec2(.2,.5)*timer;
float smk = texture(smoketex,scroll).x;
scroll = vTexCoord.st*.9+vec2(-.2,.4)*timer;
smk *= texture(smoketex,scroll).x;
return vec4(base*smk,1.);
mat.Base = vec4(base*smk,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,10 +1,10 @@
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 coord = vTexCoord.st*4.-vec2(0.,timer*0.1);
coord = fract(coord);
vec3 base = getTexel(coord).rgb;
float dist = pow(distance(vec2(.5),vTexCoord.st)*1.4,.5);
vec3 col = mix(vec3(1.,.9,.7),vec3(0.),min(1.,dist));
col *= 1.-vTexCoord.t*.8;
return vec4(base*col,1.);
mat.Base = vec4(base*col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}