Missed this too.
This commit is contained in:
parent
392985cc27
commit
c7e85563cc
3 changed files with 41 additions and 2 deletions
10
gldefs.misc
10
gldefs.misc
|
|
@ -31,6 +31,16 @@ HardwareShader Texture "graphics/HUD/HealthBarD.png"
|
|||
Define "TEX_SIZE" = "vec2(120.,25.)"
|
||||
Texture "noisetex" "textures/graynoise.png"
|
||||
}
|
||||
HardwareShader Texture "graphics/dsmapfont.png"
|
||||
{
|
||||
Shader "shaders/glsl/AreaName.fp"
|
||||
Texture "gradtex" "graphics/areaname_grad.png"
|
||||
}
|
||||
HardwareShader Texture "graphics/dsmapfont_sub.png"
|
||||
{
|
||||
Shader "shaders/glsl/AreaName.fp"
|
||||
Texture "gradtex" "graphics/areaname_grad.png"
|
||||
}
|
||||
HardwareShader Texture "graphics/HUD/DemoFace_Barrier.png"
|
||||
{
|
||||
Shader "shaders/glsl/BarrierFace.fp"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r362 \cu(Mon 22 Aug 18:13:13 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r362 \cu(2022-08-22 18:13:13)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r363 \cu(Mon 22 Aug 18:14:53 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r363 \cu(2022-08-22 18:14:53)\c-";
|
||||
|
|
|
|||
29
shaders/glsl/AreaName.fp
Normal file
29
shaders/glsl/AreaName.fp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// simple gradient map
|
||||
|
||||
vec4 BilinearSample( in sampler2D tex, in vec2 pos, in vec2 size, in vec2 pxsize )
|
||||
{
|
||||
vec2 f = fract(pos*size);
|
||||
pos += (.5-f)*pxsize;
|
||||
vec4 p0q0 = texture(tex,pos);
|
||||
vec4 p1q0 = texture(tex,pos+vec2(pxsize.x,0));
|
||||
vec4 p0q1 = texture(tex,pos+vec2(0,pxsize.y));
|
||||
vec4 p1q1 = texture(tex,pos+vec2(pxsize.x,pxsize.y));
|
||||
vec4 pInterp_q0 = mix(p0q0,p1q0,f.x);
|
||||
vec4 pInterp_q1 = mix(p0q1,p1q1,f.x);
|
||||
return mix(pInterp_q0,pInterp_q1,f.y);
|
||||
}
|
||||
|
||||
vec3 GradientMap( in float gray )
|
||||
{
|
||||
vec2 size = vec2(512.,4.);
|
||||
vec2 pxsize = 1./size;
|
||||
return BilinearSample(gradtex,vec2(gray/2.+.25,0),size,pxsize).rgb;
|
||||
}
|
||||
|
||||
void SetupMaterial( inout Material mat )
|
||||
{
|
||||
vec4 base = getTexel(vTexCoord.st);
|
||||
base.rgb = GradientMap(base.x);
|
||||
mat.Base = base;
|
||||
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue