godotengine / godotengine/godot

Ambient occlusion not working inside visual shader sampler2D

Open
#93,397 7 comments 0 reactions 0 assignees View on GitHub
discussion topic:shaders
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.2.1

### System information

Windows 10

### Issue description

Ambient occlusion not working inside visual shader sampler2D through the texture2D samplerPort.

### Steps to reproduce

ao_issue
see picture

### Minimal reproduction project (MRP)

[bug_report_shader.zip](https://github.com/user-attachments/files/15917658/bug_report_shader.zip)

Contributor guide

Open the contributing guide

Research direction

Start by opening the attached bug_report_shader.zip minimal reproduction project in Godot 4.2.1 on the reported Windows setup, then inspect the visual shader's sampler2D texture2D samplerPort and compare its ambient-occlusion output with the expected result shown in the report. Done means the reproduction no longer exhibits the reported ambient-occlusion failure.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.