Skip to content

Commit db29371

Browse files
committed
Try it as a table
1 parent 9fe21e3 commit db29371

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

src/webgl/material.js

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,28 +1179,19 @@ p5.prototype.normalShader = function() {
11791179
* You can call <a href="#/p5.Shader/modify">`colorShader().modify()`</a>
11801180
* and change any of the following hooks:
11811181
*
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.
1182+
* Hook | Description
1183+
* -------|-------------
1184+
* `void beforeVertex` | Called at the start of the vertex shader.
1185+
* `vec3 getLocalPosition` | Update the position of vertices before transforms are applied. It takes in `vec3 position` and must return a modified version.
1186+
* `vec3 getWorldPosition` | Update the position of vertices after transforms are applied. It takes in `vec3 position` and pust return a modified version.
1187+
* `vec3 getLocalNormal` | Update the normal before transforms are applied. It takes in `vec3 normal` and must return a modified version.
1188+
* `vec3 getWorldNormal` | Update the normal after transforms are applied. It takes in `vec3 normal` and must return a modified version.
1189+
* `vec2 getUV` | Update the texture coordinates. It takes in `vec2 uv` and must return a modified version.
1190+
* `vec4 getVertexColor` | Update the color of each vertex. It takes in a `vec4 color` and must return a modified version.
1191+
* `void afterVertex` | Called at the end of the vertex shader.
1192+
* `void beforeFragment` | Called at the start of the fragment shader.
1193+
* `vec4 getFinalColor` | Update the final color after mixing. It takes in a `vec4 color` and must return a modified version.
1194+
* `void afterFragment` | Called at the end of the fragment shader.
12041195
*
12051196
* Most of the time, you will need to write your hooks in GLSL ES version 300. If you
12061197
* are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.

0 commit comments

Comments
 (0)