Skip to content

Commit 9fe21e3

Browse files
committed
Test different reference layout
1 parent 82a92f8 commit 9fe21e3

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

src/webgl/material.js

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,17 +1178,29 @@ p5.prototype.normalShader = function() {
11781178
*
11791179
* You can call <a href="#/p5.Shader/modify">`colorShader().modify()`</a>
11801180
* and change any of the following hooks:
1181-
* - `void beforeVertex`: Called at the start of the vertex shader.
1182-
* - `vec3 getLocalPosition`: Update the position of vertices before transforms are applied. It takes in `vec3 position` and must return a modified version.
1183-
* - `vec3 getWorldPosition`: Update the position of vertices after transforms are applied. It takes in `vec3 position` and pust return a modified version.
1184-
* - `vec3 getLocalNormal`: Update the normal before transforms are applied. It takes in `vec3 normal` and must return a modified version.
1185-
* - `vec3 getWorldNormal`: Update the normal after transforms are applied. It takes in `vec3 normal` and must return a modified version.
1186-
* - `vec2 getUV`: Update the texture coordinates. It takes in `vec2 uv` and must return a modified version.
1187-
* - `vec4 getVertexColor`: Update the color of each vertex. It takes in a `vec4 color` and must return a modified version.
1188-
* - `void afterVertex`: Called at the end of the vertex shader.
1189-
* - `void beforeFragment`: Called at the start of the fragment shader.
1190-
* - `vec4 getFinalColor`: Update the final color after mixing. It takes in a `vec4 color` and must return a modified version.
1191-
* - `void afterFragment`: Called at the end of the fragment shader.
1181+
*
1182+
* - `void beforeVertex`
1183+
* - Called at the start of the vertex shader.
1184+
* - `vec3 getLocalPosition`
1185+
* - Update the position of vertices before transforms are applied. It takes in `vec3 position` and must return a modified version.
1186+
* - `vec3 getWorldPosition`
1187+
* - Update the position of vertices after transforms are applied. It takes in `vec3 position` and pust return a modified version.
1188+
* - `vec3 getLocalNormal`
1189+
* - Update the normal before transforms are applied. It takes in `vec3 normal` and must return a modified version.
1190+
* - `vec3 getWorldNormal`
1191+
* - Update the normal after transforms are applied. It takes in `vec3 normal` and must return a modified version.
1192+
* - `vec2 getUV`
1193+
* - Update the texture coordinates. It takes in `vec2 uv` and must return a modified version.
1194+
* - `vec4 getVertexColor`
1195+
* - Update the color of each vertex. It takes in a `vec4 color` and must return a modified version.
1196+
* - `void afterVertex`
1197+
* - Called at the end of the vertex shader.
1198+
* - `void beforeFragment`
1199+
* - Called at the start of the fragment shader.
1200+
* - `vec4 getFinalColor`
1201+
* - Update the final color after mixing. It takes in a `vec4 color` and must return a modified version.
1202+
* - `void afterFragment`
1203+
* - Called at the end of the fragment shader.
11921204
*
11931205
* Most of the time, you will need to write your hooks in GLSL ES version 300. If you
11941206
* are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.

0 commit comments

Comments
 (0)