HeapsIO / heaps

Heaps : Haxe Game Framework
http://heaps.io
MIT License
3.19k stars 338 forks source link

Help with shadows #801

Open arqlz opened 4 years ago

arqlz commented 4 years ago

How to handle correctly shadows from a directional light to a 100 instances of the same mesh?

ncannasse commented 4 years ago

In theory shadows on instanced meshes should work it's hard to tell from the picture what's good or wrong here. What's the actual problem?

Le mer. 22 avr. 2020 à 03:17, Leon notifications@github.com a écrit :

How to handle correctly shadows from a directional light to a 100 instances of the same mesh?

https://camo.githubusercontent.com/3ac778771de6a7b125853c9d4020e2d3c35b8e77/68747470733a2f2f6d656469612e646973636f72646170702e6e65742f6174746163686d656e74732f3530313430383730303134323035393532302f3730323330313331353632373335323131342f756e6b6e6f776e2e706e67

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HeapsIO/heaps/issues/801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZXQBA7S5V3OPZVFX2UDTRNZARFANCNFSM4MNWNGTA .

arqlz commented 4 years ago

no luck, the shadow does not adapt to the visible scene, so if you create a very large scene no shadow size (4096, 8192, ect) will help

ncannasse commented 4 years ago

You can set DirShadowMap.calcShadowBounds to calculate your own shadow bounding volume.

Le sam. 25 avr. 2020 à 04:08, Leon notifications@github.com a écrit :

no luck, the shadow does not adapt to the visible scene, so if you create a very large scene no shadow size (4096, 8192, ect) will help

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HeapsIO/heaps/issues/801#issuecomment-619303405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZXQAI4OG2DE5CTGVFT63ROJAZXANCNFSM4MNWNGTA .

arqlz commented 4 years ago

Ill try it