Skip to content

Complete the example for "skip_vertex_transform" #9108

@huwpascoe

Description

@huwpascoe

Issue description:

The example for skip_vertex_transform stops with a comment:

same as above for binormal and tangent, if normal mapping is used

Yes, the reader could google or gpt the correct algorithms eventually and transcribe them into godot shading language, but please let's have the full example as "how godot does it"

URL to the documentation page (if already existing):
https://docs.godotengine.org/en/4.2/tutorials/shaders/shader_reference/spatial_shader.html

shader_type spatial;
render_mode skip_vertex_transform;

void vertex() {
    VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
    NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
    // same as above for binormal and tangent, if normal mapping is used
}

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions