sezero / quakespasm

QuakeSpasm -- A modern, cross-platform Quake game engine based on FitzQuake.
https://sourceforge.net/projects/quakespasm/
GNU General Public License v2.0
241 stars 96 forks source link

Glistening effect on distant water #38

Closed Flecked42 closed 2 years ago

Flecked42 commented 2 years ago

https://user-images.githubusercontent.com/90434262/189554968-4ea798e3-b54b-4e45-a08f-6fe6a0345987.mp4

Happens with both r_oldwater 0 and 1

For reference this doesn't happen in Ironwail or vkQuake.

sezero commented 2 years ago

I assume this happens with version 0.95.0, but not with 0.94.7?

@ericwa, @andrei-drexler: ideas?

Flecked42 commented 2 years ago

It happens with both 0.95.0 and 0.94.7.

Btw the map is sm221_hcm from https://www.quaddicted.com/filebase/sm221-bridges-v1.1.zip

ericwa commented 2 years ago

When r_oldwater is 0, I would guess this is aliasing due to not having mipmaps on the warp image?

Could try https://www.khronos.org/opengl/wiki/Common_Mistakes#Legacy_Generation

j0zzz commented 2 years ago

Yeah, your tip fixed it Eric, thx a lot ❤

sezero commented 2 years ago

Can someone send a patch for QS git?

Flecked42 commented 2 years ago

https://github.com/j0zzz/JoeQuake/commit/0527dd9dac8b1f4904be2e37771a21849083edd8 is the commit that fixed it in JoeQuake.

j0zzz commented 2 years ago

I tried adding it to QS but enabling TEXPREF_MIPMAP on the warp image makes it crash, so I would let someone else with much wider knowledge do it.

Novum commented 2 years ago

You need to actually generate mipmaps after rendering the warp image to fix this

sezero commented 2 years ago

Fixed by PR #44. Closing the ticket.