mirror of
https://github.com/Relintai/godot-lportal.git
synced 2024-11-07 12:42:09 +01:00
Update README.md
This commit is contained in:
parent
1e9152c69f
commit
b510a2a5ca
12
README.md
12
README.md
@ -14,16 +14,14 @@ _Feel free to leave suggestions / feature requests on the issue tracker, especia
|
||||
_If you are interested in integrating LPortal into your game, feel free to get in touch, e.g. in the issue tracker, and I will endeavour to help._
|
||||
|
||||
## Current status
|
||||
The basic system is mostly working. I am now testing / polishing the interface and adding debugging. I will leave PVS and closable portals until after the first release.
|
||||
The basic system is working, I am now currently working on shadow casters. In a simple system you would pre-bake your lighting with e.g. lightmaps, however with realtime lights, shadow casters outside the view of the camera can cast shadows onto the objects in view. Rather than rendering everything as a possible shadow caster, it makes sense to use the same room / portal system to cull out as many shadow casters as possible that could not contribute to the final image.
|
||||
|
||||
I am now working on shadows. Shadows can be cast by objects that are not 'in view', thus with the naive culling system, in some circumstances shadows will pop into and out of view.
|
||||
Note that I've had to move from showing and hiding objects, to using Godot object and camera layers to differentiate between which objects to render from the camera and which for shadows, at least for now. This is a little hacky, and might interfere with your own code if you are using godot layers - layer 1 (default layer) is unset for all objects, and 19 and 20 are currently used by the system to determine whether objects are shadow casters or visible (or both), respectively.
|
||||
|
||||
There are three possibilities here:
|
||||
1) Draw everything in the shadow pass (use Godot default octree). This gets rid of artefacts but would be slow and negate a lot of the benefits of visibility culling.
|
||||
2) Draw everything roughly around the visible objects. The current version does this now, with the main pass only rendering objects in view, but the shadow pass draws everything within the rooms in view. This is better than naive version, but still can suffer 'popping' of shadows at doorways.
|
||||
3) More intelligent system to try and work out which shadow casters are relevant to the view.
|
||||
I've also uncovered a bug in Godot core shadow casting:
|
||||
https://github.com/godotengine/godot/pull/32475
|
||||
|
||||
Note that I've had to move from showing and hiding objects, to using Godot object and camera layers to differentiate between which objects to render from the camera and which for shadows, at least for now. This is a little hacky, and might interfere with your own code if you are using godot layers - layer 1 (default layer) is unset for all objects, and 19 and 20 are currently used by the system to toggle visibility internally.
|
||||
which I'm finding the best fix for to help with the showing / hiding of shadow casters. There is a workaround but I'm keen to get it fixed in core.
|
||||
|
||||
## Roadmap
|
||||
* Auto conversion of named room spatials and portal mesh instances to LRoom and LPortal DONE
|
||||
|
Loading…
Reference in New Issue
Block a user