godotengine / godotengine/godot

Spatial Shader ALPHA makes mesh draw over NavigationMesh3D nav mesh and other visual nodes

Open
#98,217 3 comments 1 reaction 0 assignees View on GitHub
bug confirmed topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.3.stable

### System information

Windows 10 64 bit - Godot 4.3.stable - Vulkan (Forward+)

### Issue description

While APLHA is changed in the 3D mesh's shader, the mesh(es) with the shader will draw over other nodes, eg. NavigationRegion3D's nav mesh.

Here's what it looks like with ALPHA disabled:
![image](https://github.com/user-attachments/assets/4a62a969-b40c-4c8e-b621-0d12da842840)
![image](https://github.com/user-attachments/assets/5ee0e174-b23b-4a88-a404-08c6ed5f3ab8)

and with ALPHA enabled:
![image](https://github.com/user-attachments/assets/1eb76009-5351-49a9-9215-5242ad8e6c22)
![image](https://github.com/user-attachments/assets/531f010e-a6ac-436c-bf17-b5b6c75f43d9)

### Steps to reproduce

- add NavigationRegion3D to scene
- Import a model from blender
- add collision to mesh (for navigation region 3D)
- Add a spatial shader with ALPHA set to 1.0 (as example) to the model

### Minimal reproduction project (MRP)

[example-project.zip](https://github.com/user-attachments/files/17388928/example-project.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached example-project.zip and reproduce the issue in Godot 4.3.stable using Vulkan Forward+. Compare the spatial shader with ALPHA disabled and enabled, then trace the 3D rendering interaction between the model and NavigationRegion3D's navigation mesh. Done means the model no longer draws incorrectly over the navigation mesh and other visual nodes when ALPHA is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.