Godot: When Viewport is used, shadows don't work

Created on 3 Apr 2019  路  4Comments  路  Source: godotengine/godot

Godot version:
3.2 dev

OS/device including version:
Windows 10 x64 / NVIDIA GeForce GTX 1060 6GB / Intel Core i7 4790K

Issue description:
When Viewport is used, shadows don't work:

Also as you can see, the first time I drag the ViewportContainer and click on stretch, it's with a black background and after if I move it a little, the black background disappears and the cube image appear, but with no shadows...

Steps to reproduce:
1) Open and run the project. No shadows.
2) move the camera out of viewport container and delete it. Shadows are ok.

Minimal reproduction project:
surface1.zip

documentation junior job rendering

Most helpful comment

We should document this. At the very least, mention in the class reference that shadow_atlas_size defaults to 0 so shadows won't be drawn unless it is increased. But I think we should also reference it in the viewports tutorial. http://docs.godotengine.org/en/latest/tutorials/viewports/viewports.html

All 4 comments

You need to increase the Viewport's shadow atlas size to at least 1 (it's in pixels), even though it's not used for directional shadows.

We should document this. At the very least, mention in the class reference that shadow_atlas_size defaults to 0 so shadows won't be drawn unless it is increased. But I think we should also reference it in the viewports tutorial. http://docs.godotengine.org/en/latest/tutorials/viewports/viewports.html

Thanks, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ndee85 picture ndee85  路  3Comments

gonzo191 picture gonzo191  路  3Comments

testman42 picture testman42  路  3Comments

timoschwarzer picture timoschwarzer  路  3Comments

ducdetronquito picture ducdetronquito  路  3Comments