mtwoodard/hypVR-Ray

Possible performance save.

mtwoodard opened this issue · 0 comments

I've been thinking creating another shader so that we can separate our local and global passes. This would without a doubt lead to a performance increase as it would remove a lot of the if else statements that are currently in our code. Essentially we would render to a depth texture on our first pass then test that against the second pass and take the closer fragment.

Given that our lighting is dependent on both local and global we'd likely have to figure out a new way to calculate it. I haven't looked into it much but we might be able to defer this to a third final pass.