Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong shader type in WebGL texture tutorial #37625

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

abstractskies
Copy link
Contributor

@abstractskies abstractskies commented Jan 12, 2025

Description

The tutorial states that the vertex shader passes texture coordinates to itself, which is incorrect, and does not reflect what the example code actually does.
It should say that the vertex shader passes texture coordinates to the fragment shader (through vTextureCoord), which in turn uses them to sample the right part of the texture.

Motivation

The error might confuse someone not familiar with the graphics pipeline, which is the intended audience of this tutorial.

Additional details

n/a

Related issues and pull requests

n/a

Corrected section "Updating the shaders" > "The vertex shader".
The vertex shader passes the texture coordinates to the fragment shader, not to itself.
@abstractskies abstractskies requested a review from a team as a code owner January 12, 2025 23:07
@abstractskies abstractskies requested review from sideshowbarker and removed request for a team January 12, 2025 23:07
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Jan 12, 2025
Copy link
Contributor

@sideshowbarker sideshowbarker merged commit b2cab24 into mdn:main Jan 13, 2025
8 checks passed
@sideshowbarker
Copy link
Member

Jessy, nice catch 〜 congrats on landing your first docs change here — welcome aboard 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants