Closed Rikoshet-234 closed 4 years ago
Oh yeah, that is weird. If r_particles is set to 1 so the particles are circles, they show as circles within transparent squares. If you set r_quadparticles to 0 they show as circles within big triangles like before.
(ignore the vkQuake version number, I compiled it myself a day or so 1.04 was released so it has the changes)
yea, this half-transparent quads looks weird. and i think we have a blending problem in shader
ha, i fixed it )
problem was in fragment shader. when i tweak this value to 0.0, it starts looks like in quakespasm engine
I can't repro this. What mod is this? But your fix might make sense. I don't think the alpha should be affected by the fog value.
alpha - no, just color. my tweak make no sense, because then it looks different than in qs. there is a map i taken a screenshot from https://www.quaddicted.com/reviews/bindingtower2.html in vanilla quake (id1). i can make some snapshots for you in renderdoc if you want
by the way, how can I rebuild shaders ? I tried through .bat and .sh - they don't work in my case
so, looks like i found what is going wrong when we create a new vector consisting of xyzw components, it is assumed that the alpha channel is also used in mathematical operations. but when we write vec4(fog), the compiler seems to take it as vec4 (fog, fog, fog, w ). we don't have the w component initially, but we need it for operations on a 4-dimensional array. in this case, the compiler substitutes the standard value for us in the place w of the component (w = 0.5 based on my observations) when I put 1 (alpha = 1) in the place of the missing component value. the particles began to look exactly like in quakespasm but as soon as I changed the value of the W component to 0.5, I got the same result as before
I think we need to review the shaders for the presence of such defects as this
So, I found how to compile shaders and tested my fix. What else... its work the same as in quakespasm :)
@Rikoshet-234 To recompile the shaders, you will have to have the Vulkan SDK installed and make sure to log out afterwards to get the environment variables set up correctly.
Quakespasms shader looks a bit different, I want to make sure that it's really identical.
Yes, quakespasm doesn't have shader code. everything written in C using the gl function etc. but I fixed your mistake. and if you don't know how qs shaders work, then who wrote these shaders ? for vkquake I mean of course. for me its looks the same as in qs engine, i was compared it in many maps i was played before - the same fog and particle blending.
you're right, though. it is better to make sure that everything works exactly the same as in qs. still, this is a transfer to another api, not a reimplementation:) I hope to soon be able to solve these problems with the differences between vkQuake and quakespasm
Why are you trying to lecture me? I wrote all of the vkQuake rendering code. I do understand the QuakeSpasm shaders just fine. I just want to CHECK to make sure I make the right fix and I didn't have time yet. This bug isn't critical.
sorry :) I'm a little confused myself XD. just forget this misunderstanding ;)
1ddea619923d99f6c10e73b3fcdb78f8134f5673
Hi ! please, check that ( recently closed ) issue. Thank you in advance :)