meteoritool Posted June 10, 2017 Share Posted June 10, 2017 Hi, It's all in the title ! As for now, light.needRefreshPerFrame() seems broken : http://www.babylonjs-playground.com/#1ITHGT#1 light0.needRefreshPerFrame is not a function. (In 'light0.needRefreshPerFrame(false)', 'light0.needRefreshPerFrame' is undefined) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 10, 2017 Share Posted June 10, 2017 Perhaps because it is NOT a function http://www.babylonjs-playground.com/#1ITHGT#2 Quote Link to comment Share on other sites More sharing options...
meteoritool Posted June 11, 2017 Author Share Posted June 11, 2017 I might have got wrong the documentation, but before last update, there was no error in my script, now it doesn't work anymore, but I had it written as a function with no error with previous versions ... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 11, 2017 Share Posted June 11, 2017 Good catch! This is @Sebavan fault he broke the compat with his last change. @Sebavan: Do you mind reverting it to a method? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 11, 2017 Share Posted June 11, 2017 Hello, This method was not taking any params and Here is why it has been removed: https://github.com/BabylonJS/Babylon.js/blob/087e898e334957ce17ecb0129d1da5c8459354b5/src/Lights/babylon.directionalLight.ts#L142 This was simply returning an hard coded boolean and not intented to be called but to allow external people to create their own light/shadow system. I am not for reverting this one :-) as it just adds code which does nothing. This was also forcing the shadows matrix to refresh on every frame despite the position or direction cached in the light so basically removing it makes it also more performant. @Deltakosh @meteoritool any thought ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 12, 2017 Share Posted June 12, 2017 Makes sense..Let's keep it like this. THis is fine 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.