-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lavaalpha issues in ne_ruins (invisible lava) #767
Comments
It seems that the "lava" in this map is a bit different from the usual lava (e.g.. id1/end ), as it is always rendered with r_lavaalpha 1 in ironwail and quakespasm. The value for r_wateralpha of 0.6 is not applied here ( r_lavaalpha "0" ). |
first bad commit is 810725b It looks like only lava parallel to the floor is rendered incorrectly. r_lavaalpha 1: r_lavaalpha <1: r_lavaalpha 1: r_lavaalpha <0: |
Thanks to have tracked down this. I may be worth reverting this "optimization" if the change is actually not too big. I'll look into when I have more time. |
I started playing r_novis 0
r_wateralpha 0.8
r_slimealpha 0.85
r_lavaalpha 1.0
r_telealpha 1.0 I see no problem with lava so far: so setting There are too many trenparency combinations vs. rendering and in reality I'm not competent to try to change this without breaking anything else, so I'm closing this. |
found another map with this issue. it seems map is not water-vised, but vkquake will render water/slime as black and the portal is not rendered at all. |
the common theme here seems to be liquid surfaces with alpha value of 1.0 in bsp are not rendered correctly if cvar r_wateralpha is < 1 ( assuming r_{tele,slime,lava}alpha 0 ). All teleporters, even the two teleporters in the standard part of DM1, ( entities have alpha 1 ) and the water/slime pool in the mirror world ( also alpha 1 ) are affected by this bug. |
Do we know what kind of artifacts this commit 810725b is supposed to fix?
It can be reverted w/o breaking anything else. Until we figure out what's missing. This commit has some more issues or unexpected behaviour: load savegame and suddenly the water surface of the water/slime pool is rendered correctly ( opaque = alpha 1 ) there is another location in this map, pond in the forest, with the same issue. |
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Oh no ! anyway. @j4reporting Thanks for your previous investigation. Turns out there was one bug in that commit smashing the stack, luckily reported by MSVC in debug : the erroneous call to This is ok so far with as you said with
This behaves similarily with this branch, is a sense that switching back and forth between For instance, if we suppose the level has a built-in
So, supposing you don't want to force tranparency in a level where there is already one specified, it is better to stick with the default transparency values at startup (meaning : apply the ones of the level) I changed my r_wateralpha 1.0
r_slimealpha 0
r_lavaalpha 0
r_telealpha 0
alias al_watertoggle_on "echo Water tranparency on ; r_wateralpha 0.7 ; r_slimealpha 0.85 ; r_lavaalpha 1.0 ; r_telealpha 1.0 ; bind w al_watertoggle_off"
alias al_watertoggle_off "echo Water tranparency default ; r_wateralpha 1.0; r_slimealpha 0.0 ; r_lavaalpha 0.0 ; r_telealpha 0.0 ; bind w al_watertoggle_on"
bind w al_watertoggle_on I bounded |
is one of the maps included in sm230 affected, too?
Some maps will set _wateralpha in worldspawn, so it's ok to override with r_wateralpha but if an entity has a specific alpha value assigned in the map, then it should not be affected by any global change. Inky was so kind to send me the map source file and the water/slime pool has an alpha setting of 1.0 for water and slime.
func_togglevisiblewall will change the visibility. Water entity becomes disabled and the slime entity is going to be rendered instead. Both have
|
Sorry, that was just a joke :) So kind of people to provide more test case for us.
I see the same in Was it OK with your version of the revert ? If yes, the only difference is the very erroneous usage of R_CalcSpecialsAndTextures in r_brush.c that I removed. Edit : this is likely because of my 'hardening' of |
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Right, I've re-pushed I was trying to mark I kept the out-of bound check just in case, triggering |
I just reverted cf9054c and it seems to be fine. ;) Master renders correctly if I remove lines 1157 and 1158 in Lines 1153 to 1160 in 1d1e80c
not sure what the cost is here. |
if (((opaque_only && alpha_blend) || (transparent_only && !alpha_blend)) && (!r_lightmap_cheatsafe || !indirect))
continue;
I replayed No apparent performance impact on my side, on my not-so recent gaming laptop. |
I'd guess this are the 'slight performance improvements' mentioned by temx in his commit. I wonder if this is a general issue with edicts with a fixed alpha =1 value? They seem to be used rarely (only two maps so far) that we are aware of. Detect if such edict exist and disable the shortcut in line 1157 + 1158 or handle the alpha value as 0.99 internally? |
I would prefer an explicit test localized here than altering the original alpha value. Which test though ? only try to shortcut if |
sure, altering the alpha value just as an experiment / idea.
when edict are read from map file? If such an edict with alpha = 1.0 is detected disable the shortcut for the map. |
I'll be honest, this is awful no thanks :). I would disable the piece of code entirely (keeping it between |
I did not claim that it would be an elegant workaround ;) 99.9% of the maps do work fine with this code in place, I grepped through some map source files, and if alpha is used then mostly with values <1 ne_ruins.bsp has strings like
We know that both maps are rendered correctly in an opaque world ( ne_ruins needs r_lavaalpha 1 to render correctly, because map sets _wateralpha 0.6 in worldspawn). The code assumes that ALL liquid surfaces are transparent in a transparent world with alpha_blend active. |
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Right, I admit I'm lost. Please @j4reporting provide a PR if you have an idea because you definitly have one it seems :) |
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
sorry, no PR atm. I only have limited understanding of the code and it's probably wrong anyway ;) |
…767) Solves trensparent water in some particular maps Set to 0 by default (archived) for all because it doesn't look to have visible performance impact.
No indeed not, even if it is only 2 maps (so far) since there is no (apparent) drawback to disable it. In the meantime, we can live with In
Using either liquid defaults ( |
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
…ovum#767) Solves trensparent water in some particular maps Set to 0 by default (archived) for all because it doesn't look to have visible performance impact.
Removed erroneous call to Mod_CalcSpecialsAndTextures a.k.a R_CalcSpecialsAndTextures in r_brush.c, as in master. This reverts commit 810725b.
In the "Altar of Storms" mod:
https://www.quaddicted.com/reviews/ne_ruins.html
At some point during the second map the lava rises and floods the lower part of the level. It is invisible in vkQuake.
I noticed this bug just as vkQuake was archived nearly two years ago so I couldn't create an issue here but then I was reminded of this bug today.
The problem appeared around the time Temx reworked the engines' alphasorting, the mod was working fine in vkQuake in older versions.
I have tried disabling r_alphasort but it doesn't change the problem.
I noticed that r_wateralpha is at 0.7 and r_lavaalpha is at 0.
Changing either r_wateralpha or r_lavaalpha to 1 makes the lava appear, but any other value (between ==0 and <1) the lava is invisible.
I don't know if the issue is caused because the lava is invisible at the start of the map or what (as it rises during the level).
I use vkQuake in Win10 with a geforce980
In vkQuake:


In Ironwail for comparison:
A save to the spot with the problem:
save.zip
The text was updated successfully, but these errors were encountered: