Skip to content
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

Lightmapped water #1518

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Lightmapped water #1518

wants to merge 12 commits into from

Conversation

a1batross
Copy link
Member

@a1batross a1batross commented Dec 2, 2023

TODO:

  • basic renderer for lightmapped opaque water surfaces
  • move renderer into a similar to EmitWaterPolys function to apply lightmaps on waves
  • detect presense of lightmap on water surface, do not build texcoords where it's not needed
  • lightmaps on other rendermodes? how?
  • ...

@a1batross a1batross changed the title [WIP] Lightmapped water Lightmapped water Aug 22, 2024
@a1batross
Copy link
Member Author

a1batross commented Aug 22, 2024

  • Added lightmaps on wavey water and transparent water
  • Simplified code a lot, makes diff easier to read :)

@a1batross
Copy link
Member Author

Despite that in most cases there is ready to use lightmap for water surfaces, a lot of maps weren't really made with lightmapped water in mind, and it's quite hard to see through it. See water at gasworks.bsp, the room isn't lit enough for water doesn't receive the light at all.

So I'm looking for ways to make lightmap on water surfaces less dark in general but keep it the same when it's properly lit. Even simple addition or scale make the situation better, but again, it also makes some lit spots too intense. Like some sort of hyperbolic scaling depending on lightmap value.

Later it must be possible to configure it through worldspawn key values.

@a1batross
Copy link
Member Author

Later it must be possible to configure it through worldspawn key values.

Done.

So I'm looking for ways to make lightmap on water surfaces less dark in general but keep it the same when it's properly lit

Done.

@a1batross
Copy link
Member Author

There is a bug though: as we don't draw back faces, the water surface doesn't get drawn when the camera is underwater.

…htmapped water

* Rename gl_litwater to gl_litwater_force because it doesn't affect maps that declare
  litwater support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant