EVSM, 2 component vs 4 component

Started by
2 comments, last by MJP 8 years, 1 month ago

I'm looking for an explanation and/or example of why using 4 components vs 2 components is important for EVSM. In my limited tests, using 2 component 32 bit gives much nicer results overall vs 4 component 16bit. Dropping from 4 to 2 components does result in a bit more light-leaking, but it doesn't seem bad in the test scenes I'm looking at. It's still hugely improved vs straight VSM. Going down to 16bit however (even 4 components) causes pretty noticeable aliasing, and the required bias seems to result in peter-panning as well.

I remember specifically reading a presentation from Ready at Dawn, where they had to fall back to using 16bit for memory reasons on The Order. Is there a good reason they chose this trade-off, vs dropping down to 2 components?

Advertisement

I went with 16-bit because there's too many artifacts when using the 2-component version EVSM. Specifically, you run into issues in areas with high geometrical complexity where the receiver surface is non-planar relative to the filter kernel. See the original paper (go to section 7) for some more details.

I really noticed it on our characters and faces, due to their dense, curved geometry. I took some screenshots from my sample app in attempt to replicate the issues that I saw in The Order:

This is 4-component EVSM with 32-bit textures:

[attachment=31193:EVSM4.PNG]

This is 2-component EVSM with 32-bit textures (look at the shadow cast by the nose):

[attachment=31192:EVSM2.PNG]

And this is 4-component EVSM with 16-bit textures, with the bias and leak reduction turned up:

[attachment=31194:EVSM4_16bit.PNG]

That's very helpful, thank you.

What kind of values did you end up needing for leak reduction? Is that a value that you think makes sense to expose to artists per light, or did you get away with a hard-coded global value?

I usually use around 0.2-0.25. I think it's okay to hard-code it, personally. You can't really go much higher than that without breaking filtering, and the improvement from going lower is pretty small. I prefer not to expose things unless it proves truly necessary, especially if it requires adding additional data that needs to be read per-light on the GPU.

This topic is closed to new replies.

Advertisement