fte-team / fteqw

This is the official GitHub mirror for the FTEQW project.
https://www.fteqw.org/
170 stars 52 forks source link

`r_wateralpha < 1` rendering issues #210

Open fhomolka opened 1 year ago

fhomolka commented 1 year ago

Games Tested: Quake 1 r_wateralpha has a few issues.

shpuld commented 1 year ago

afaik this happens when a map vis isn't compiled for transparent water. there are versions of the maps that are, including the rereleased versions

correct behavior in this case would be to recognize if map has transparent vis and turn off wateralpha but sounds unlikely that it's possible

On Wed, 9 Aug 2023, 19.45 fhomolka, @.***> wrote:

Games Tested: Quake 1 r_wateralpha has a few issues.

-

At a distance, the brushes behind the liquid are not drawn unless the player or an entity casting light are near it. This causes the transparent, warping texture, to appear smeared. Smeared: [image: fte-20230809134112-0] https://user-images.githubusercontent.com/21170980/259394297-10ad92fe-bec5-4111-b9cd-9ea565ba8dcf.png Light in water: [image: fte-20230809134119-0] https://user-images.githubusercontent.com/21170980/259394366-423f4f20-46b9-4fd0-ae18-146d07877ba9.png

At some parts of the map, it acts as straight up wallhacks. The specific case seems to be that there must be only the void between the space the player is in, and the loaded space [image: clipboard] https://user-images.githubusercontent.com/21170980/259394716-7dfd718c-9804-4ab9-b3d9-e51f00cc05ab.png

— Reply to this email directly, view it on GitHub https://github.com/fte-team/fteqw/issues/210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACTIJLJBQVB4BP5XMMDKK7LXUNZ57ANCNFSM6AAAAAA3J34TXE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fhomolka commented 1 year ago

Ah yes, you're right! Okay, the issue is different, then: FTE should probably warn if the map isn't water-vised, since the game is technically working correctly.

eukara commented 1 year ago

I am not sure there is a way to figure out if something is patched with watervis. How watervis works is like this, you take a .bsp and run the vis tool over it again, which is patched to ignore any water-prefixed-brushes during its calculation. It's making the map slightly less optimized so we can have transparent water not produce a hall of mirrors. There's no universal way to detect that has taken place. It just shakes up the portals within the maps.

Edit: Response from Spike:

\<Spoike> I wrote some code to detect it. \<Spoike> qss certainly does so \<Spoike> general rule is to check if some underwater leaf can see any above-water leaf. \<Spoike> if it can then its watervised. \<Spoike> problem is that water and tele textures are both water, and if someone's using weird settings then you can get false positives.

fhomolka commented 1 year ago

Yeah, QSS has some detection. The message there says "Map might not be water-vised", which is fine. This will usually appear in older maps, since most modern map compilers will watervis. So, it's one of those "is it worth it" deals