Jump to content

Lights for my horror corridor


meteoritool
 Share

Recommended Posts

  • 2 weeks later...

Hello again !

To make a dynamic ShadowRenderList, I've made a function to check if a mesh is at a certain distance from camera. The function is executed every x milliseconds with a setInterval().

http://playground.babylonjs.com/#1NLCOZ#10

I have a problem : if you walk on, in the playground, you'll notice that that last walls' shadows are no more rendered.
I feel that the shadowmap "possible size" here is static, then shadows outside of the initial map are not rendered even if mesh is in renderlist... I'm not sure ...

#1: How can I make this work ? the size/position of the shadowmap ?

#2: In the example above, the variable I've made to define the wanted range is "cameraCorrectRange". If you set it to a very high value (covering the whole scene, 500 for example), the shadow would be correctly rendered everywhere, but if you walk on forward toward the opposite edge, there is a point where the shadow suddenly disappears :-/ feels like a bug ?

Thx ^_^ for your help !

edit : I forgot to add instances to my "checkRangeToCamera" function :
http://playground.babylonjs.com/#1NLCOZ#11
But it doesn't change anything, apparently, looping through "scene.meshes" also includes instances !

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...