meteoritool Posted November 12, 2016 Share Posted November 12, 2016 Hi ! My question is in the title ! I've been testing with a moving pointLight, but its lighting still 'updates' either set to true or false. I wonder what needRefreshPerFrame does exactly just curious ! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 12, 2016 Share Posted November 12, 2016 Hi M. Didjadoo a github source code search for that? https://github.com/BabylonJS/Babylon.js/search?p=1&q=needRefreshPerFrame&utf8 See a pattern? PointLights, directionalLights, spotLights... but no hemisphericLights. Hmm. Those are the 3 types of lights that produce shadows. Hmm. Oh, and there's shadowGenerator.js line 333 returning in the search, too. Hmm. No, I really don't know what it does. But we can probably pretend like we know what it does, now. heh. I hereby pretend... that this setting determines whether the shadow-generating light... gets a re-calculated ShadowProjectionMatrix... each time the shadowGenerator's getTransformMatrix() is called. How's that? Did I sound like I actually have a clue? Well, I don't, but... I'm glad I sound like I do. All in all, I think you will want to use your light for a BJS shadowGenerator... and THEN try your tests. Good luck. Report results if you like... and... party on! meteoritool 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 14, 2016 Share Posted November 14, 2016 Hello good question This parameter is used to define if the shadow map needs to be recompute on every frame even if the light does not move. Actually this is required only for directional lights because the projectionmatrix used by directional lights is dependent on the meshes lit by the light. meteoritool and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.