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

This commit is contained in:
Marisa the Magician 2025-11-01 13:32:57 +01:00
commit 1583863894
16 changed files with 58 additions and 205 deletions

View file

@ -1,26 +1,9 @@
// 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);
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 gs = texture(ambglow,vec2(.5)).xy;
if ( gs.x > .5 ) getTexel(vTexCoord.st);
if ( gs.y > .5 )
{
float glow = max(0.,sin(timer*4.)-.5);
vec4 col = getTexel(vTexCoord.st);
return vec4(min(col.rgb+vec3(glow),1.),col.a);
}
return getTexel(vTexCoord.st);
mat.Base = getTexel(vTexCoord.st);
float glow = .25+.2*sin(timer*8.);
mat.Bright = vec4(vec3(glow),1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,28 +1,11 @@
// imitation of the Unreal Engine 1.x ambient glow effect
// plus brightmapping
vec4 ProcessLight( vec4 color )
{
float bright = texture(brighttex,vTexCoord.st).x;
vec2 gs = texture(ambglow,vec2(.5)).xy;
if ( gs.x > .5 ) return vec4(min(color.rgb+vec3(bright),1.),color.a);
if ( gs.y > .5 )
{
float glow = max(0.,sin(timer*4.)-.5);
return vec4(min(color.rgb+vec3(bright)+vec3(glow),1.),color.a);
}
float glow = .25+.2*sin(timer*8.);
return vec4(min(color.rgb+vec3(bright)+vec3(glow),1.),color.a);
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 gs = texture(ambglow,vec2(.5)).xy;
if ( gs.x > .5 ) getTexel(vTexCoord.st);
if ( gs.y > .5 )
{
float glow = max(0.,sin(timer*4.)-.5);
vec4 col = getTexel(vTexCoord.st);
return vec4(min(col.rgb+vec3(glow),1.),col.a);
}
return getTexel(vTexCoord.st);
mat.Base = getTexel(vTexCoord.st);
float bright = texture(brighttex,vTexCoord.st).x;
float glow = .25+.2*sin(timer*8.);
mat.Bright = vec4(vec3(min(1.,bright+glow)),1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,9 +1,4 @@
vec4 ProcessLight( vec4 color )
{
return vec4(1.);
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 coord = vTexCoord.st;
vec2 dist = 2.*texture(warptex,vTexCoord.st).xy-1.;
@ -13,5 +8,7 @@ vec4 ProcessTexel()
dist.y *= abs(mod(dist.x+timer*5.45363,4.)-2.)-1.;
coord.y -= dist.y*.09;
coord.y = clamp(coord.y,0.,1.);
return getTexel(coord);
mat.Base = getTexel(coord);
mat.Bright = vec4(1.); // force fullbright
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,9 +1,4 @@
vec4 ProcessLight( vec4 color )
{
return vec4(1.);
}
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 coord = vTexCoord.st;
vec2 dist = 2.*texture(warptex,vTexCoord.st*.6).xy-1.;
@ -14,5 +9,7 @@ vec4 ProcessTexel()
coord.y -= dist.y*.09;
coord.x += timer*.05346;
coord.y += timer*.03425;
return getTexel(coord);
mat.Base = getTexel(coord);
mat.Bright = vec4(1.); // force fullbright
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,7 +1,8 @@
// imitation of the Unreal Engine 1.x bMeshEnviroMap effect, not 1:1 but gets close
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec3 eyedir = normalize(uCameraPos.xyz-pixelpos.xyz);
vec3 norm = reflect(eyedir,normalize(vWorldNormal.xyz));
return getTexel(norm.xz*.5+.5);
mat.Base = getTexel(norm.xz*.5+.5);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,29 +1,12 @@
// 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
vec4 ProcessTexel()
// +
// imitation of the Unreal Engine 1.x ambient glow effect
void SetupMaterial( inout Material mat )
{
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 ) getTexel(norm.xz*.5+.5);
if ( gs.y > .5 )
{
float glow = max(0.,sin(timer*4.)-.5);
vec4 col = getTexel(norm.xz*.5+.5);
return vec4(min(col.rgb+vec3(glow),1.),col.a);
}
return getTexel(norm.xz*.5+.5);
float glow = .25+.2*sin(timer*8.);
mat.Bright = vec4(vec3(glow),1.);
mat.Base = getTexel(norm.xz*.5+.5);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,4 +1,4 @@
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
vec2 ccoord = uv-vec2(.5,1.1);
@ -9,13 +9,13 @@ vec4 ProcessTexel()
vec3 bcol = texture(starstex,fract(coord)).rgb;
coord = uv*1.5;
coord = (coord-vec2(.8,.3))*2.;
vec4 mcol = texture(moontex,coord);
vec4 mcol = texture(moontex,clamp(coord,vec2(0.),vec2(1.)));
bcol = mix(bcol*.3,mcol.rgb*.7,mcol.a);
coord = proj*.5+vec2(-.5,-1.)*timer*.1;
coord = fract(coord);
vec3 col = getTexel(coord).rgb;
col *= mix(vec3(1.9,.4,.2),vec3(1.),pow(pt.z,.5));
col *= mix(vec3(1.3,.5,.3),vec3(1.),pow(pt.x+.8,.5));
col *= mix(vec3(1.1,1.4,1.3),vec3(.3),clamp(1.3*pow(distance(pt.xy,vec2(.2,-.25)),.9),0.,1.));
return vec4(bcol+col,1.);
}
mat.Base = vec4(bcol+col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}

View file

@ -1,22 +1,28 @@
// based on https://www.shadertoy.com/view/Ms2SWW
vec4 ProcessTexel()
void SetupMaterial( inout Material mat )
{
vec2 uv = vTexCoord.st;
vec2 p = 2.*(uv-.5);
p.x += sin(timer*.2)*.3;
p.y += cos(timer*.2)*.3;
float a = atan(p.y,p.x);
float a2 = atan(p.y,abs(p.x));
a += timer*.1;
a2 += timer*.1;
float r = length(p);
vec2 ccoord = fract(vec2(.25/r+.1*timer,a/3.14169265)*4.);
vec3 col = getTexel(ccoord).rgb;
vec2 ccoord = vec2(.25/r+.1*timer,a/3.14169265)*4.;
vec2 ccoord2 = vec2(ccoord.x,a2/3.14169265)*4.;
vec3 col = textureGrad(tex,ccoord,dFdx(ccoord2),dFdy(ccoord2)).rgb;
a += .125*3.14159265;
ccoord = fract(vec2(.25/r+.05*timer,a/3.14169265)*4.);
col += getTexel(ccoord).rgb;
a2 += .125*3.14159265;
ccoord = vec2(.25/r+.05*timer,a/3.14169265)*4.;
ccoord2 = vec2(ccoord.x,a2/3.14169265)*4.;
col += textureGrad(tex,ccoord,dFdx(ccoord2),dFdy(ccoord2)).rgb;
col *= vec3(.3,.6,1.);
col += pow(max(0.,1.2-r),1.5);
col *= vec3(1.,1.2,1.5);
col = clamp(col,vec3(0.),vec3(1.));
return vec4(col,1.);
}
mat.Base = vec4(col,1.);
mat.Normal = ApplyNormalMap(vTexCoord.st);
}