-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Shadow mapping vs scissor test #3532
Comments
anyone? |
ok, I've found a workaround:
-> this works, yet problem is, I'm completely uselessly rendering also the normal scene into framebuffer in the first step, that is discarded afterwards (performance). I've not found any way to render shadows only (render.renderPlugins(ShadowMapPlugin,,,) method is not visible publicly), I'd like to avoid hacking into the three.js code -> so a suggestion: some public method to enable shadow only rendering? |
Exact same issue with r61. +1 for workaround :
|
Just encountered this same issue and verified the workaround but yea, it does waste an extra render. One piece that's missing above is to make sure to turn off the scissor test because it will be left on from the previous frame. Here's my version (based on yours):
|
I'm running into the same issue, seems like shadow maps aren't playing nice with viewports/scissor test somehow, would be nice to see this fixed or even acknowledged, looks like the devs ignored it/didn't see it. |
It goes a bit over my head at the moment :) |
Fixed! (2 years later... 😇) |
great, thanks! 👍 |
sure this is fixed? I'm still running into the problem (R73) or is it in the latest build |
Yes, it's in |
Confirmed fixed in dev branch. Thanks for fixing this mere weeks before i needed to implement the feature (otherwise i'd have to duplicate the context to render two viewports or settle for shadowmap the same size as my viewport) 👍 |
Ah okay great! |
Hi!
I've run into issue when trying to use shadows in my scene that is rendered into two separate viewports (separate scenes, based on http://mrdoob.github.io/three.js/examples/webgl_multiple_views.html). The moment I enable shadowing, shadow map (used only in one scene, one viewport) is corrupted. Please see the image attached. There is only one shadow receiver in the screenshot and no object casting shadows, yet, parts of the ground are suggested as in shadow. When I remove renderer.enableScissorTest(true), shadows are ok (but I lose my other viewport rendering of course).
Can this be done with some workaround?
three.js r58, win7, latest google chrome, latest firefox
Great library btw! Keep up the good work and thanks for any advice!
Regards,
Boris Zapotocky
The text was updated successfully, but these errors were encountered: