Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dumb Idea: Per-Object Shadow Hackery #3

Open
mcmonkey4eva opened this issue Sep 3, 2017 · 3 comments
Open

Dumb Idea: Per-Object Shadow Hackery #3

mcmonkey4eva opened this issue Sep 3, 2017 · 3 comments

Comments

@mcmonkey4eva
Copy link
Member

I had an odd idea...

What if instead of building a shadow map for sky lighting, we calculated the shadow from each object into a massive array of relatively low-res* shadow images, and merely projected that down onto land?

* Current shadow map is generally pretty big, 1024x1024 x light source count is standard.
We could easily make this 64x64 without anyone complaining... But large objects would drop quality.
Perhaps a giant 2d texture atlas as opposed to a 3D texture, thus allowing dynamic refitting? Would require more involved shader uniforms to pass the correct data in...

Using some trickery*, this could even allow transparent objects to cast full accurate shadows!

* Trickery would basically just be a second buffer alongside the first that identifies rough alpha value of each shadow pixel.

This would probably not be particularly efficient compared to standard shadow mapping, but might be worth a try?

Alternately, could be used for ONLY transparent shadows and NOT for opaques?

@mcmonkey4eva
Copy link
Member Author

This should probably be sky light only, I don't see this being very effective with other light sources... but maybe it could be possible?
One step at a time: See how well it works for sky lights... if it goes well, try for other types!

@mcmonkey4eva
Copy link
Member Author

Possibly as well: a 'mixed' mode.
Distant or insignificant or whatever objects get a generic area blast shadow, meanwhile important or close or whatever objects get individual scans.

@mcmonkey4eva
Copy link
Member Author

This could potentially actually be fairly clever...
As object shadows would rarely need updates!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant