Page 2 of 2
Re: [Patch] Spotlight and Fog (Part 1: Spotlight)

Posted:
Sun Apr 02, 2017 11:23 am
by Ian
fixed shaded polys are not affected by spotlight at all.
I think the spot light should be enabled for everything. Spot light doesn't use normals for lighting. What do you think?
Re: [Patch] Spotlight and Fog (Part 1: Spotlight)

Posted:
Sun Apr 02, 2017 11:34 am
by HarryTuttle
I think the same. For now I didn't notice anything "off" or strange with the scene by enabling spotlight for all.
I'll think of some test case to ultimately confirm this, however.
Re: [Patch] Spotlight and Fog (Part 1: Spotlight)

Posted:
Sun Apr 02, 2017 2:09 pm
by Ian
Harry, I've pushed your code. I made a few small changes. I put the fog calculation back inside the vertex shader. This is how the original hardware would have done it. Also cuts down the size of the fragment shader a bit, but otherwise the code is nearly identical.
Tried out emergency call ambulance, looks really fantastic. Great work !
We probably should always use the spot light regardless of the lighting value. But can look at that another night.
Re: [Patch] Spotlight and Fog (Part 1: Spotlight)

Posted:
Sun Apr 02, 2017 3:38 pm
by HarryTuttle
Thanks Ian!
I'm planning to look into the remaining issues with spotlight, specular and fixed shading, I'd like to fix them before the next release.
Re: [Patch] Spotlight and Fog

Posted:
Sun Oct 01, 2017 1:54 pm
by HarryTuttle
Resuming the old thread. Here's the latest spotlight & fog patch for r667.
- rewrote the math in a simpler way, it should be almost arcade-perfect. Fixed Dirt Devils' expert course lighting issues during night (after 2nd lap, if I recall), fixed some issues in ECA attract mode (just before the breaking screen glass effect), and maybe other games as well;
- commented vp->spotRange[0] limits hack for Star Wars Trilogy in <New3D.cpp> as it doesn't seem to improve anything now, instead breaks LeMans 24 spotlight fading distance;
Re: [Patch] Spotlight and Fog

Posted:
Tue Oct 03, 2017 3:27 pm
by Ian
Hey, sorry it's taken me longer to look at this.
Shouldn't we also be patching the scroll fog class ?

Re: [Patch] Spotlight and Fog

Posted:
Tue Oct 03, 2017 4:01 pm
by HarryTuttle
Ian wrote:Hey, sorry it's taken me longer to look at this.
No problem
Ian wrote:Shouldn't we also be patching the scroll fog class ?
No, we don't need to do that. On scroll fog Spotlight is just an ellipse without start,extent and decay terms. The current official implementation seems correct.