Skip to content

Lots of incorrect diagnostics #3

@stevenctl

Description

@stevenctl

These are all from the same shader that works just fine in Godot 4.2 stable.

  1. invalid shader include directory
#include "./include/Triplanar.gdshaderinc"
  1. Invalid arguments for function 'textureLod' (also leads to Expected return type 'float')
float sampleHeight(vec2 uv) {
   return textureLod(heightmap, uv, 0).r * height_scale;
}
  1. Type mismatch: 'float' and 'vec3'.
vec3 colorRamp(float value) {
    // Define your color stops
    vec3 colors[32];
    colors[0] = vec3(0.0, 0.0, 0.5);    // Dark Blue
    colors[1] = vec3(1.0, 0.0, 0.0);    // Red
    colors[2] = vec3(0.0, 1.0, 0.0);    // Green
    colors[3] = vec3(1.0, 1.0, 0.0);    // Yellow
...
  1. Expected Expression (leads to `Identifier 'colors' is undefined.')
  const uint DEBUG_TEXTURES = uint(8);
  vec3 colors[DEBUG_TEXTURES];
  1. Function 'smoothstep' does not exist.
    smoothstep(0.0, 1.0, abs(dot(worldNormal, vec3(1.0, 0.0, 0.0)))),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions