Fix liquid shader compile error
Reported by someone in-game.
Why do we even have this file? It doesn't work at all so shouldn't we just nuke it?
There's an issue for it: #850. It is used however, e. g. on map https://users.unvanquished.net/~sweet/pkg/map-citadel_0%2B0.dpk.
It doesn't work at all so shouldn't we just nuke it?
It does sort of work, but there are some issues with it that need to be fixed.
Why add a GLSL compile macro that's always enabled? The point of those is to build multiple variants of the shader.
Also it's possible that grid lighting or deluxe mapping are globally disabled.
Why add a GLSL compile macro that's always enabled? The point of those is to build multiple variants of the shader. Also it's possible that grid lighting or deluxe mapping are globally disabled.
Well, it's required for ReadLightGrid() and ComputeDeluxeLight() to be available. Perhaps liquid shader should just be disabled if those aren't available.
Well, it's required for
ReadLightGrid()andComputeDeluxeLight()to be available.
Could just write #define USE_GRID_LIGHTING or whatever in the liquid shader.
I've changed this to actually check if lightgrid/deluxegrid are available. Otherwise it would probably break if the map lacks one.
LGTM