Skip to content

Commit

Permalink
Fix wrong shader type in WebGL texture tutorial
Browse files Browse the repository at this point in the history
Corrected section "Updating the shaders" > "The vertex shader".
The vertex shader passes the texture coordinates to the fragment shader, not to itself.
  • Loading branch information
abstractskies authored Jan 12, 2025
1 parent 9156c03 commit 61135ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const vsSource = `
`;
```

The key change here is that instead of fetching the vertex color, we're fetching the texture coordinates and passing them to the vertex shader; this will indicate the location within the texture corresponding to the vertex.
The key change here is that instead of fetching the vertex color, we're fetching the texture coordinates and passing them to the fragment shader; this will indicate the location within the texture corresponding to the vertex.

### The fragment shader

Expand Down

0 comments on commit 61135ce

Please sign in to comment.