Skip to content

Outdated information in "Your first 2D shader"? #7458

@thiagola92

Description

@thiagola92

Your Godot version: v4.0.3.rc2.official [2ac4e3bb3]

Issue description:
In the section "Using TEXTURE built-in" mentions that i need to read the texture, otherwise i will have an all white rectangle.
After testing I noticed that didn't made difference, is this right?

void fragment(){
  //this shader will result in an all white rectangle
  COLOR.b = 1.0;
}
void fragment(){
  COLOR = texture(TEXTURE, UV); //read from texture
  COLOR.b = 1.0; //set blue channel to 1.0
}

URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/shaders/your_first_shader/your_first_2d_shader.html#using-texture-built-in

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationbugtopic:shaders

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions