Three.js: what is shadowCascade ?

Created on 9 May 2012  路  6Comments  路  Source: mrdoob/three.js

I am looking at direcitonallight casting shadow. and i see several property with shadowCascade. Can somebody gives details on those properties ?

https://github.com/mrdoob/three.js/blob/master/src/lights/DirectionalLight.js#L39

Question

Most helpful comment

Why they have been removed?

See https://github.com/mrdoob/three.js/issues/5536#issuecomment-141166976.

All 6 comments

These properties are for controlling cascaded shadow maps.

Cascaded shadow maps are a method for getting better shadows from directional light over larger areas (think sunlight).

It works by splitting camera frustum into multiple subfrusta and then fitting light frustum to these, generating multiple shadow maps.

Basically, if you would try to fit a single light frustum to large scene, shadow would just look terrible, even with high resolution shadow map.

With cascaded shadows, you can have relatively high resolution shadows close to camera and then uglier shadows more far from camera, but there it's less jarring because screen size occupied by shadow is smaller.

Cascaded shadow maps are used here:

http://alteredqualia.com/three/examples/webgl_road.html
http://alteredqualia.com/three/examples/webgl_morphtargets_md2_control.html

thanks. i will study your examples

Why they have been removed?

Why they have been removed?

See https://github.com/mrdoob/three.js/issues/5536#issuecomment-141166976.

It's very sad this still hasn't been reanimated since 4 years, i didn't even knew it existed in THREE before, that's a really big loss. I'll look into that implementation, but from 48 to 96 that's a huge gap.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bandit picture Bandit  路  3Comments

konijn picture konijn  路  3Comments

fuzihaofzh picture fuzihaofzh  路  3Comments

akshaysrin picture akshaysrin  路  3Comments

seep picture seep  路  3Comments