Skip to content

Visual Shader not declaring a parameter when the nodes are only connected to a VaryingSetter #75735

Closed
@VantaGhost

Description

@VantaGhost

Godot version

v4.0.2.stable.mono.official [7a0977c]

System information

Windows 10

Issue description

When using the Visual Shader editor, if the output of a set of nodes only connects to a VaryingSetter, any Parameter nodes will fail to declare themselves in the generated code. This causes an error in the shader when the missing parameter is accessed, breaking the whole shader.

This happens in both the Vertex and Fragment functions (that I've tested) and with different types of parameters.

Steps to reproduce

GodotVSBug

To Reproduce:

  1. Create a new visual shader
  2. In one of the shader functions (for example Vertex) create a new varying with the "manage varyings" button
  3. Add a varying setter node and set it to the new varying
  4. Add a parameter node of an appropriate type and connect to the varying setter
  5. Click on the "show generated shader code" button, you should see the unknown identifier error

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions