You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/webgl/ShaderGenerator.js
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1645,7 +1645,7 @@ if (typeof p5 !== 'undefined') {
1645
1645
/**
1646
1646
* @method getWorldInputs
1647
1647
* @description
1648
-
* Registers a callback to modify the world-space properties of each vertex in a shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to customize vertex positions, normals, texture coordinates, and colors before rendering. "World space" refers to the coordinate system of the 3D scene, before any camera or projection transformations are applied.
1648
+
* Registers a callback to modify the world-space properties of each vertex in a shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to customize vertex positions, normals, texture coordinates, and colors before rendering. "World space" refers to the coordinate system of the 3D scene, before any camera or projection transformations are applied.
1649
1649
*
1650
1650
* The callback receives a vertex object with the following properties:
1651
1651
* - `position`: a three-component vector representing the original position of the vertex.
@@ -1694,7 +1694,7 @@ if (typeof p5 !== 'undefined') {
1694
1694
/**
1695
1695
* @method combineColors
1696
1696
* @description
1697
-
* Registers a callback to customize how color components are combined in the fragment shader. This hook can be used inside <a href="#/p5/baseMaterialShader">baseMaterialShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to control the final color output of a material. The callback receives an object with the following properties:
1697
+
* Registers a callback to customize how color components are combined in the fragment shader. This hook can be used inside <a href="#/p5/baseMaterialShader">baseMaterialShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to control the final color output of a material. The callback receives an object with the following properties:
1698
1698
*
1699
1699
* - `baseColor`: a three-component vector representing the base color (red, green, blue).
1700
1700
* - `diffuse`: a single number representing the diffuse reflection.
@@ -1749,7 +1749,7 @@ if (typeof p5 !== 'undefined') {
1749
1749
* @method beforeVertex
1750
1750
* @private
1751
1751
* @description
1752
-
* Registers a callback to run custom code at the very start of the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to set up variables or perform calculations that affect every vertex before processing begins. The callback receives no arguments.
1752
+
* Registers a callback to run custom code at the very start of the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to set up variables or perform calculations that affect every vertex before processing begins. The callback receives no arguments.
1753
1753
*
1754
1754
* Note: This hook is currently limited to per-vertex operations; storing variables for later use is not supported.
1755
1755
*
@@ -1767,7 +1767,7 @@ if (typeof p5 !== 'undefined') {
1767
1767
* @method afterVertex
1768
1768
* @private
1769
1769
* @description
1770
-
* Registers a callback to run custom code at the very end of the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to perform cleanup or final calculations after all vertex processing is done. The callback receives no arguments.
1770
+
* Registers a callback to run custom code at the very end of the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to perform cleanup or final calculations after all vertex processing is done. The callback receives no arguments.
1771
1771
*
1772
1772
* Note: This hook is currently limited to per-vertex operations; storing variables for later use is not supported.
1773
1773
*
@@ -1785,7 +1785,7 @@ if (typeof p5 !== 'undefined') {
1785
1785
* @method beforeFragment
1786
1786
* @private
1787
1787
* @description
1788
-
* Registers a callback to run custom code at the very start of the fragment shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to set up variables or perform calculations that affect every pixel before color calculations begin. The callback receives no arguments.
1788
+
* Registers a callback to run custom code at the very start of the fragment shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to set up variables or perform calculations that affect every pixel before color calculations begin. The callback receives no arguments.
@@ -1828,7 +1828,7 @@ if (typeof p5 !== 'undefined') {
1828
1828
/**
1829
1829
* @method getPixelInputs
1830
1830
* @description
1831
-
* Registers a callback to modify the properties of each fragment (pixel) before the final color is calculated in the fragment shader. This hook can be used inside <a href="#/p5/baseMaterialShader">baseMaterialShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to adjust per-pixel data before lighting/mixing.
1831
+
* Registers a callback to modify the properties of each fragment (pixel) before the final color is calculated in the fragment shader. This hook can be used inside <a href="#/p5/baseMaterialShader">baseMaterialShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to adjust per-pixel data before lighting/mixing.
1832
1832
*
1833
1833
* The callback receives an `Inputs` object. Available fields depend on the shader:
1834
1834
*
@@ -1890,7 +1890,7 @@ if (typeof p5 !== 'undefined') {
1890
1890
* @method shouldDiscard
1891
1891
* @private
1892
1892
* @description
1893
-
* Registers a callback to decide whether to discard (skip drawing) a fragment (pixel) in the fragment shader. This hook can be used inside <a href="#/p5/baseStrokeShader">baseStrokeShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to create effects like round points or custom masking. The callback receives a boolean:
1893
+
* Registers a callback to decide whether to discard (skip drawing) a fragment (pixel) in the fragment shader. This hook can be used inside <a href="#/p5/baseStrokeShader">baseStrokeShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to create effects like round points or custom masking. The callback receives a boolean:
1894
1894
* - `willDiscard`: true if the fragment would be discarded by default
1895
1895
*
1896
1896
* Return true to discard the fragment, or false to keep it.
@@ -1924,7 +1924,7 @@ if (typeof p5 !== 'undefined') {
1924
1924
/**
1925
1925
* @method getFinalColor
1926
1926
* @description
1927
-
* Registers a callback to change the final color of each pixel after all lighting and mixing is done in the fragment shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to adjust the color before it appears on the screen. The callback receives a four component vector representing red, green, blue, and alpha.
1927
+
* Registers a callback to change the final color of each pixel after all lighting and mixing is done in the fragment shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to adjust the color before it appears on the screen. The callback receives a four component vector representing red, green, blue, and alpha.
1928
1928
*
1929
1929
* Return a new color array to change the output color.
1930
1930
*
@@ -1966,7 +1966,7 @@ if (typeof p5 !== 'undefined') {
1966
1966
* @method afterFragment
1967
1967
* @private
1968
1968
* @description
1969
-
* Registers a callback to run custom code at the very end of the fragment shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to perform cleanup or final per-pixel effects after all color calculations are done. The callback receives no arguments.
1969
+
* Registers a callback to run custom code at the very end of the fragment shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to perform cleanup or final per-pixel effects after all color calculations are done. The callback receives no arguments.
@@ -2009,7 +2009,7 @@ if (typeof p5 !== 'undefined') {
2009
2009
/**
2010
2010
* @method getColor
2011
2011
* @description
2012
-
* Registers a callback to set the final color for each pixel in a filter shader. This hook can be used inside <a href="#/p5/baseFilterShader">baseFilterShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to control the output color for each pixel. The callback receives the following arguments:
2012
+
* Registers a callback to set the final color for each pixel in a filter shader. This hook can be used inside <a href="#/p5/baseFilterShader">baseFilterShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to control the output color for each pixel. The callback receives the following arguments:
2013
2013
* - `inputs`: an object with the following properties:
2014
2014
* - `texCoord`: a two-component vector representing the texture coordinates (u, v).
2015
2015
* - `canvasSize`: a two-component vector representing the canvas size in pixels (width, height).
@@ -2052,7 +2052,7 @@ if (typeof p5 !== 'undefined') {
2052
2052
/**
2053
2053
* @method getObjectInputs
2054
2054
* @description
2055
-
* Registers a callback to modify the properties of each vertex before any transformations are applied in the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to move, color, or otherwise modify the raw model data. The callback receives an object with the following properties:
2055
+
* Registers a callback to modify the properties of each vertex before any transformations are applied in the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to move, color, or otherwise modify the raw model data. The callback receives an object with the following properties:
2056
2056
*
2057
2057
* - `position`: a three-component vector representing the original position of the vertex.
2058
2058
* - `normal`: a three-component vector representing the direction the surface is facing.
@@ -2099,7 +2099,7 @@ if (typeof p5 !== 'undefined') {
2099
2099
/**
2100
2100
* @method getCameraInputs
2101
2101
* @description
2102
-
* Registers a callback to adjust vertex properties after the model has been transformed by the camera, but before projection, in the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify</a> calls to create effects that depend on the camera's view. The callback receives an object with the following properties:
2102
+
* Registers a callback to adjust vertex properties after the model has been transformed by the camera, but before projection, in the vertex shader. This hook can be used inside <a href="#/p5/baseColorShader">baseColorShader()</a>.modify() and similar shader <a href="#/p5.Shader/modify">modify()</a> calls to create effects that depend on the camera's view. The callback receives an object with the following properties:
2103
2103
*
2104
2104
* - `position`: a three-component vector representing the position after camera transformation.
2105
2105
* - `normal`: a three-component vector representing the normal after camera transformation.
0 commit comments