Hi _mental_,

I wondered why this problem didn't shows up sooner. I had the same problem with Brutal Doom Black Edition v3.1d Final (same authors as the mod you mentioned) which likely use the same shaders.

(Disclamer: I know nothing of GLSL programing, Doom scripting, etc... at all)

I saw that such scripts are used through the file GLDEFS, and track their reference from here in the rest of BE mod.

Turns out grass.shader, trees.shader were not used (apparently) so I've defined a noise2 function local to them doing nothing, namely returning the argument itself.

There was another shader TP.shader which on the contrary was used.

I replaced its code with the following, after looking at the Internet:

- Code: Select all • Expand view
`uniform float timer;`

const float pi = 3.14159265358979323846;

const float Intensity = 0.4;

float rand(float xx)

{

float x0 = floor(xx);

float x1 = x0+1;

float v0 = fract(sin (x0*.014686)*31718.927+x0);

float v1 = fract(sin (x1*.014686)*31718.927+x1);

return (v0*(1-fract(xx))+v1*(fract(xx)))*2-1*sin(xx);

}

vec2 SineWave( vec2 p ){

// float pi = 3.14159;

float A = 0.15;

float w = 10.0 * pi;

float t = 30.0*pi/180.0;

float x = p.x + p.y*tan( -0.5);

float y = sin( w*x + t) * A;

return vec2(p.x, p.y+y);

}

///////////////////////////////////// ADD NOISE2 REPLACEMENT //////////////////////

//self: https://www.shadertoy.com/view/4llcWn

//This shader mostly shows big LCG differences due to minor seed-precision differences.

//Than it "randomly" rants A LOT about "randomness", being more about noise than hash.

const float Phi=sqrt(5.)*.5+.5;//1.61; Phi-1=1/Phi , larger root.

const float fha=14142.1356237; //most famous arbitiary amplitude fora hash what uses cos()

//maximum precision "gold noise", is "better" or "worse" depending on your bias==context.

float h12goldM(vec2 coordinate,float seed) {

return fract(sin(dot(coordinate*seed,vec2(Phi,pi)))*fha);

}

//high precision "gold noise" , similar to from gold_noiseH()

// but it has LESS apparent diagonal lines, as these get lost with lower precision.

float h12goldH(vec2 coordinate,float seed) {

return fract(sin(dot(coordinate*seed, vec2(1.61803398875,

3.14159265359)))*fha);

}

vec2 noise2(in vec2 coordinate) {

return vec2(h12goldM(coordinate, timer),

h12goldH(coordinate, timer));

}

///////////////////////////////////////////////////////////////////////////////////////////

vec4 Process(vec4 color)

{

vec2 t = gl_TexCoord[0].st;

vec2 test = SineWave(vec2(rand(1.5),timer));

t.x += Intensity * (cos( timer/test.x) * (1.0 - t.y)) * sin( t.x * pi * .5 );

t.y += Intensity * (cos( timer/test.y) * (1.0 - t.x)) * sin( t.y * pi * .5 );

t += noise2(t) * sin( pi * 0.5 *( timer* 1.5 ));

return getTexel(t) * color;

}

The code above (//////) is from me using this as inpiration:

https://www.shadertoy.com/view/4llcWnI've no idea if it is correct, as any kind of meaning, or how it is copyrighted either.

According to GLDEFS I guess it is used for TelePorter rendering: TF0G[A-H]0 files, indeed PNG files are found in SPRITES/PARTICLES directory of the mod, and match the teleporter effects that can be seen in game.

- Code: Select all • Expand view
`...`

HardwareShader Sprite TFOGA0

{

Shader "Shaders/TP.shader"

Speed 1.0

}

HardwareShader Sprite TFOGB0

{

Shader "Shaders/TP.shader"

Speed 1.1

}

HardwareShader Sprite TFOGC0

{

Shader "Shaders/TP.shader"

Speed 1.2

}

...

So far it allowed me to run BE in Vulkan, but clearly a proper replacement would be better.