Page 4 of 4

Re: Unlimited Light Sources with Clustered Forward Shading

Posted: 11 Mar 2019, 14:53
by AnyOldName3
To make OpenMW use all lights for everything, the quick thing to do would be to make the light list callback just enable every light and then tweak the shader so it can accept that many lights. It won't quite be the tidiest thing in the world and there'd be some redundant work, but it would be enough to get a ballpark estimate of whether implementing anything fancy and scaleable is worthwhile.

Re: Unlimited Light Sources with Clustered Forward Shading

Posted: 12 Mar 2019, 13:45
by CMAugust
Yeah all I had tried in the past was set MAX_LIGHTS in the shader to a high number and obviously nothing good happened. It figures there's some hardcoded stuff to tweak as well.

Re: Unlimited Light Sources with Clustered Forward Shading

Posted: 12 Mar 2019, 14:31
by AnyOldName3
The shader ignores any lights it's told to use beyond that number, but that doesn't mean the engine is bothering to tell it to use any other lights.

It might be a case of tweaking a couple of lines in the light manager, or it might involve moving away from glLight to a custom uniform depending on the maximum fixed function light count of modern GPUs.

Re: Unlimited Light Sources with Clustered Forward Shading

Posted: 12 Jun 2019, 01:58
by CMAugust
3-month check-in: I'm still interested in updating this thread with examples of clustered shading in the wild as they're found, but there's also the matter of the suggested test using basic forward rendering. Any news on when or if this ballpark estimate can be conducted? I simply don't have the expertise to make the necessary code tweaks, whatever they may be.

Re: Unlimited Light Sources with Clustered Forward Shading

Posted: 12 Jun 2019, 14:32
by AnyOldName3
It's all still on my to-do list.

With the amount of time it's taking to get around to stuff, it might genuinely be worth your while to learn some OpenGL if you haven't already. I know I've mentioned that before.