godotengine / godotengine/godot

VisualShader: Naming Texture2DParameter "AO" breaks shader

Open
#100,403 2 comments 0 reactions 0 assignees View on GitHub
bug topic:editor topic:shaders
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.4 dev6

### System information

Godot v4.4.dev6 - Windows 10.0.19045 - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated AMD Radeon RX 580 2048SP (Advanced Micro Devices, Inc.; 31.0.21921.1000) - Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz (4 threads)

### Issue description

Naming texture2DParameter "AO" breaks the shader, as seen in the first image. Second image is the same node setup with the name changed.

![Image](https://github.com/user-attachments/assets/9c6e9eb8-cead-4645-9575-89b03c0e3bb7)

![Image](https://github.com/user-attachments/assets/2b88e575-17cc-45e1-b385-35fc60f1028e)

### Steps to reproduce

Texture2DParameter connected to samplerPort, name Texture2DParameter "AO"

### Minimal reproduction project (MRP)

Any project

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in a minimal Godot project with a VisualShader Texture2DParameter connected to samplerPort and named "AO". Compare the generated shader with the same node using a different name; done means the "AO" name no longer produces a broken shader.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, game-dev
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.