Assortment of VKDoom-related shader fixes.
This commit is contained in:
parent
8857c3c03f
commit
9a9c419dc1
5 changed files with 19 additions and 147 deletions
116
gldefs/misc.txt
116
gldefs/misc.txt
|
|
@ -246,127 +246,11 @@ Material Texture "graphics/NewLogo.png"
|
|||
Shader "shaders/glsl/NewLogoAnimated.fp"
|
||||
// what no 2d arrays does to a mf
|
||||
Texture "Layer1" "graphics/NewLogo_Layer1.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
Texture "Layer2" "graphics/NewLogo_Layer2.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
Texture "Layer3" "graphics/NewLogo_Layer3.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
Texture "gradtex" "graphics/NewLogo_Grad.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
Texture "fadetex" "LOGOFADE"
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter0.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter0.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter1.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter1.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter2.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter2.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter3.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter3.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter4.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter4.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter5.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter5.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter6.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter6.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter7.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter7.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter8.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter8.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter9.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter9.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter10.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter10.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter11.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter11.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/NewLogo_Letter12.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
Texture "retex" "graphics/NewLogo_Letter12.png"
|
||||
{
|
||||
filter linear
|
||||
}
|
||||
}
|
||||
Material Texture "graphics/M_DEMOLITIONIST.png"
|
||||
{
|
||||
Shader "shaders/glsl/TexFilterHack.fp"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1178 \cu(jue 06 feb 2025 20:13:35 CET)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1178 \cu(2025-02-06 20:13:35)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1179 \cu(dom 09 feb 2025 16:17:53 CET)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1179 \cu(2025-02-09 16:17:53)\c-";
|
||||
|
|
|
|||
|
|
@ -29,15 +29,9 @@ void SetupMaterial( inout Material mat )
|
|||
envcol = (envcol+grad)*.25;
|
||||
#endif
|
||||
mat.Base = vec4(envcol,1.);
|
||||
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
||||
}
|
||||
|
||||
vec4 ProcessLight( Material mat, vec4 color )
|
||||
{
|
||||
#ifdef AMBIENT_GLOW
|
||||
float glow = .75+.25*sin(timer*8.);
|
||||
return vec4(vec3(glow),color.a);
|
||||
#else
|
||||
return color;
|
||||
mat.Glow = vec4(vec3(glow),1.);
|
||||
#endif
|
||||
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,40 +41,37 @@ vec3 GradientMap( in vec3 color )
|
|||
{
|
||||
float gray = dot(color,vec3(.333333));
|
||||
vec2 pos = vec2(gray/2.+.25,0.);
|
||||
return textureLod(gradtex,pos,0.).rgb;
|
||||
return texture(gradtex,pos,0.).rgb;
|
||||
}
|
||||
|
||||
void SetupMaterial( inout Material mat )
|
||||
{
|
||||
// store these to save some time
|
||||
vec2 size = vec2(textureSize(Layer1,0));
|
||||
vec2 pxsize = 1./size;
|
||||
// y'all ready for this multilayered madness?
|
||||
vec2 uv = vTexCoord.st;
|
||||
// base blank layer
|
||||
vec4 base = vec4(1.);
|
||||
// first layer, warp then multiply red
|
||||
base.rgb *= textureLod(Layer1,warpcoord(uv),0.).x;
|
||||
base.rgb *= texture(Layer1,warpcoord(uv)).x;
|
||||
// first layer, multiply green
|
||||
base.rgb *= textureLod(Layer1,uv,0.).y;
|
||||
base.rgb *= texture(Layer1,uv).y;
|
||||
// first layer, add blue
|
||||
base.rgb += textureLod(Layer1,uv,0.).zzz;
|
||||
base.rgb += texture(Layer1,uv).zzz;
|
||||
// multiply by red fade
|
||||
base.rgb *= textureLod(fadetex,vec2(.5),0.).x;
|
||||
base.rgb *= texture(fadetex,vec2(.5)).x;
|
||||
// gradient map result
|
||||
base.rgb = GradientMap(base.rgb);
|
||||
// color to alpha
|
||||
base = blacktoalpha(base);
|
||||
// second layer, alpha blend
|
||||
vec4 tmp = textureLod(Layer2,uv,0.);
|
||||
vec4 tmp = texture(Layer2,uv);
|
||||
vec4 tmp2;
|
||||
tmp2.a = tmp.a+base.a*(1.-tmp.a);
|
||||
tmp2.rgb = (tmp.rgb*tmp.a+base.rgb*base.a*(1.-tmp.a))/tmp2.a;
|
||||
base = tmp2;
|
||||
// third layer, hard light with two multiplied masks
|
||||
tmp.xy = textureLod(Layer3,uv,0.).xy;
|
||||
tmp.z = textureLod(fadetex,vec2(.5),0.).y;
|
||||
tmp.y *= textureLod(Layer3,clamp(uv+vec2(1.-tmp.z*2.,0.),vec2(0.),vec2(1.)),0.).z;
|
||||
tmp.xy = texture(Layer3,uv).xy;
|
||||
tmp.z = texture(fadetex,vec2(.5)).y;
|
||||
tmp.y *= texture(Layer3,clamp(uv+vec2(1.-tmp.z*2.,0.),vec2(0.),vec2(1.))).z;
|
||||
tmp2.r = hardlight(base.r,tmp.x);
|
||||
tmp2.g = hardlight(base.g,tmp.x);
|
||||
tmp2.b = hardlight(base.b,tmp.x);
|
||||
|
|
|
|||
|
|
@ -3,16 +3,13 @@
|
|||
void SetupMaterial( inout Material mat )
|
||||
{
|
||||
mat.Base = getTexel(vTexCoord.st);
|
||||
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
||||
}
|
||||
|
||||
vec4 ProcessLight( Material mat, vec4 color )
|
||||
{
|
||||
float mixfct = mix(1.,.5,floor(abs(vTexCoord.s-.5)*2.133333));
|
||||
mixfct = mix(mixfct,.5,floor(abs(vTexCoord.t-.5)*2.13333));
|
||||
mat.Base.rgb *= mixfct;
|
||||
vec3 light = vec3(-.6,.7,.8);
|
||||
float val = max(dot(normalize(vEyeNormal.xyz),light),.25);
|
||||
val += .2*pow(max(dot(normalize(vEyeNormal.xyz),light),0.),4.);
|
||||
float mixfct = mix(1.,.5,floor(abs(vTexCoord.s-.5)*2.133333));
|
||||
mixfct = mix(mixfct,.5,floor(abs(vTexCoord.t-.5)*2.13333));
|
||||
val *= mixfct;
|
||||
return vec4(vec3(val),color.a);
|
||||
mat.Base.rgb *= val;
|
||||
mat.Bright = vec4(1.);
|
||||
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue