godotengine / godotengine/godot
Stencil camera angle makes the walls behind it invisible
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.5.stable,
### System information
cpu:AMD9600X,gpu:Inter ARC B580,vulkan
### Issue description
I'm making a portal, and I'm using a stencil to see through the walls in the portal view, but the portal shader has an opacity area that makes the walls behind it invisible to the player's view, and the bug only occurs when the portal is viewed from a certain angle. it seems to have something to do with the stencil, the camera angle, and so on.
### Steps to reproduce
wall:
portal(01.gdshader):
### Minimal reproduction project (MRP)
[One Portal.zip](https://github.com/user-attachments/files/22583894/One.Portal.zip)
Contributor guide
Research direction
Run the attached One Portal.zip minimal reproduction in Godot 4.5 and reproduce the missing walls while changing the viewing angle. Start by inspecting the portal setup and 01.gdshader, then trace the stencil and camera behavior involved; done means the walls remain visible from the affected angles without breaking the portal view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100