Giter Club home page Giter Club logo

Comments (2)

pythoneer avatar pythoneer commented on August 15, 2024

Yes, but thats no bug. This is intended to work as it is. If you had do lit ( and therefore shadowing ) a huge area you need a pretty damn big shadow map. to lower the cost of a massiv shadowmap, you only shadowing an area in a close distance to your camera and translate the shadowmap regarding to your camera position. you can adjust the factor of how far away from the camera the shadow disappears, but that is closely related to the resolution of the shadowmap regards the world distance units. eg. the more area you cover with your shadowmap the lower gets the resolution of your shadowmap in like one by one meter.

from 3denginecpp.

BennyQBD avatar BennyQBD commented on August 15, 2024

This is the effect we talked about in the generic directional light shadows video. Directional light shadows must have a finite range because the shadow map must have a finite resolution. Since directional lights cast light over an infinite area, then past some point shadows simply disappear, like you've shown here.

You can reduce this effect a lot using techniques like cascading shadow maps or light-space perspective shadow maps, but it will still occur to some extent.

There is a way to "fix" this and have directional lights cast shadows throughout the entire view frustum: adjust the shadow area so it maps to the same area that the view frustum sees. Although this will get rid of the shadow disappearing effect, the shadow map will appear to have a very low resolution, since it's covering such a huge area. Overcoming that requires using the aforementioned more advanced techniques, like cascading shadow maps or light-space perspective shadow maps.

from 3denginecpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.