@@ -887,7 +887,7 @@ p5.prototype.shader = function (s) {
887887 * Get the default shader used with lights, materials,
888888 * and textures.
889889 *
890- * You can call <a href="#/p5.Shader/modify">`materialShader ().modify()`</a>
890+ * You can call <a href="#/p5.Shader/modify">`baseMaterialShader ().modify()`</a>
891891 * and change any of the following hooks:
892892 *
893893 * <table>
@@ -1032,10 +1032,10 @@ p5.prototype.shader = function (s) {
10321032 * Most of the time, you will need to write your hooks in GLSL ES version 300. If you
10331033 * are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
10341034 *
1035- * Call `materialShader ().inspectHooks()` to see all the possible hooks and
1035+ * Call `baseMaterialShader ().inspectHooks()` to see all the possible hooks and
10361036 * their default implementations.
10371037 *
1038- * @method materialShader
1038+ * @method baseMaterialShader
10391039 * @beta
10401040 * @returns {p5.Shader } The material shader
10411041 *
@@ -1046,7 +1046,7 @@ p5.prototype.shader = function (s) {
10461046 *
10471047 * function setup() {
10481048 * createCanvas(200, 200, WEBGL);
1049- * myShader = materialShader ().modify({
1049+ * myShader = baseMaterialShader ().modify({
10501050 * uniforms: {
10511051 * 'float time': () => millis()
10521052 * },
@@ -1075,7 +1075,7 @@ p5.prototype.shader = function (s) {
10751075 *
10761076 * function setup() {
10771077 * createCanvas(200, 200, WEBGL);
1078- * myShader = materialShader ().modify({
1078+ * myShader = baseMaterialShader ().modify({
10791079 * declarations: 'vec3 myNormal;',
10801080 * 'Inputs getPixelInputs': `(Inputs inputs) {
10811081 * myNormal = inputs.normal;
@@ -1115,7 +1115,7 @@ p5.prototype.shader = function (s) {
11151115 *
11161116 * function setup() {
11171117 * createCanvas(200, 200, WEBGL);
1118- * myShader = materialShader ().modify({
1118+ * myShader = baseMaterialShader ().modify({
11191119 * 'Inputs getPixelInputs': `(Inputs inputs) {
11201120 * float factor =
11211121 * sin(
@@ -1150,7 +1150,7 @@ p5.prototype.shader = function (s) {
11501150 *
11511151 * function setup() {
11521152 * createCanvas(200, 200, WEBGL);
1153- * myShader = materialShader ().modify({
1153+ * myShader = baseMaterialShader ().modify({
11541154 * 'Inputs getPixelInputs': `(Inputs inputs) {
11551155 * vec3 newNormal = inputs.normal;
11561156 * // Simple bump mapping: adjust the normal based on position
@@ -1189,15 +1189,15 @@ p5.prototype.shader = function (s) {
11891189 * </code>
11901190 * </div>
11911191 */
1192- p5 . prototype . materialShader = function ( ) {
1193- this . _assert3d ( 'materialShader ' ) ;
1194- return this . _renderer . materialShader ( ) ;
1192+ p5 . prototype . baseMaterialShader = function ( ) {
1193+ this . _assert3d ( 'baseMaterialShader ' ) ;
1194+ return this . _renderer . baseMaterialShader ( ) ;
11951195} ;
11961196
11971197/**
11981198 * Get the shader used by <a href="#/p5/normalMaterial">`normalMaterial()`</a>.
11991199 *
1200- * You can call <a href="#/p5.Shader/modify">`normalShader ().modify()`</a>
1200+ * You can call <a href="#/p5.Shader/modify">`baseNormalShader ().modify()`</a>
12011201 * and change any of the following hooks:
12021202 *
12031203 * Hook | Description
@@ -1217,10 +1217,10 @@ p5.prototype.materialShader = function() {
12171217 * Most of the time, you will need to write your hooks in GLSL ES version 300. If you
12181218 * are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
12191219 *
1220- * Call `normalShader ().inspectHooks()` to see all the possible hooks and
1220+ * Call `baseNormalShader ().inspectHooks()` to see all the possible hooks and
12211221 * their default implementations.
12221222 *
1223- * @method normalShader
1223+ * @method baseNormalShader
12241224 * @beta
12251225 * @returns {p5.Shader } The `normalMaterial` shader
12261226 *
@@ -1231,7 +1231,7 @@ p5.prototype.materialShader = function() {
12311231 *
12321232 * function setup() {
12331233 * createCanvas(200, 200, WEBGL);
1234- * myShader = normalShader ().modify({
1234+ * myShader = baseNormalShader ().modify({
12351235 * uniforms: {
12361236 * 'float time': () => millis()
12371237 * },
@@ -1258,7 +1258,7 @@ p5.prototype.materialShader = function() {
12581258 *
12591259 * function setup() {
12601260 * createCanvas(200, 200, WEBGL);
1261- * myShader = normalShader ().modify({
1261+ * myShader = baseNormalShader ().modify({
12621262 * 'vec3 getWorldNormal': '(vec3 normal) { return abs(normal); }',
12631263 * 'vec4 getFinalColor': `(vec4 color) {
12641264 * // Map the r, g, and b values of the old normal to new colors
@@ -1284,15 +1284,15 @@ p5.prototype.materialShader = function() {
12841284 * </code>
12851285 * </div>
12861286 */
1287- p5 . prototype . normalShader = function ( ) {
1288- this . _assert3d ( 'materialShader ' ) ;
1289- return this . _renderer . normalShader ( ) ;
1287+ p5 . prototype . baseNormalShader = function ( ) {
1288+ this . _assert3d ( 'baseNormalShader ' ) ;
1289+ return this . _renderer . baseNormalShader ( ) ;
12901290} ;
12911291
12921292/**
12931293 * Get the shader used when no lights or materials are applied.
12941294 *
1295- * You can call <a href="#/p5.Shader/modify">`colorShader ().modify()`</a>
1295+ * You can call <a href="#/p5.Shader/modify">`baseColorShader ().modify()`</a>
12961296 * and change any of the following hooks:
12971297 *
12981298 * Hook | Description
@@ -1312,10 +1312,10 @@ p5.prototype.normalShader = function() {
13121312 * Most of the time, you will need to write your hooks in GLSL ES version 300. If you
13131313 * are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
13141314 *
1315- * Call `colorShader ().inspectHooks()` to see all the possible hooks and
1315+ * Call `baseColorShader ().inspectHooks()` to see all the possible hooks and
13161316 * their default implementations.
13171317 *
1318- * @method colorShader
1318+ * @method baseColorShader
13191319 * @beta
13201320 * @returns {p5.Shader } The color shader
13211321 *
@@ -1326,7 +1326,7 @@ p5.prototype.normalShader = function() {
13261326 *
13271327 * function setup() {
13281328 * createCanvas(200, 200, WEBGL);
1329- * myShader = colorShader ().modify({
1329+ * myShader = baseColorShader ().modify({
13301330 * uniforms: {
13311331 * 'float time': () => millis()
13321332 * },
@@ -1347,15 +1347,15 @@ p5.prototype.normalShader = function() {
13471347 * </code>
13481348 * </div>
13491349 */
1350- p5 . prototype . colorShader = function ( ) {
1351- this . _assert3d ( 'colorShader ' ) ;
1352- return this . _renderer . colorShader ( ) ;
1350+ p5 . prototype . baseColorShader = function ( ) {
1351+ this . _assert3d ( 'baseColorShader ' ) ;
1352+ return this . _renderer . baseColorShader ( ) ;
13531353} ;
13541354
13551355/**
13561356 * Get the shader used when drawing the strokes of shapes.
13571357 *
1358- * You can call <a href="#/p5.Shader/modify">`strokeShader ().modify()`</a>
1358+ * You can call <a href="#/p5.Shader/modify">`baseStrokeShader ().modify()`</a>
13591359 * and change any of the following hooks:
13601360 *
13611361 * <table>
@@ -1487,10 +1487,10 @@ p5.prototype.colorShader = function() {
14871487 * Most of the time, you will need to write your hooks in GLSL ES version 300. If you
14881488 * are using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead.
14891489 *
1490- * Call `strokeShader ().inspectHooks()` to see all the possible hooks and
1490+ * Call `baseStrokeShader ().inspectHooks()` to see all the possible hooks and
14911491 * their default implementations.
14921492 *
1493- * @method strokeShader
1493+ * @method baseStrokeShader
14941494 * @beta
14951495 * @returns {p5.Shader } The stroke shader
14961496 *
@@ -1501,7 +1501,7 @@ p5.prototype.colorShader = function() {
15011501 *
15021502 * function setup() {
15031503 * createCanvas(200, 200, WEBGL);
1504- * myShader = strokeShader ().modify({
1504+ * myShader = baseStrokeShader ().modify({
15051505 * 'Inputs getPixelInputs': `(Inputs inputs) {
15061506 * float opacity = 1.0 - smoothstep(
15071507 * 0.0,
@@ -1535,7 +1535,7 @@ p5.prototype.colorShader = function() {
15351535 *
15361536 * function setup() {
15371537 * createCanvas(200, 200, WEBGL);
1538- * myShader = strokeShader ().modify({
1538+ * myShader = baseStrokeShader ().modify({
15391539 * uniforms: {
15401540 * 'float time': () => millis()
15411541 * },
@@ -1581,7 +1581,7 @@ p5.prototype.colorShader = function() {
15811581 *
15821582 * function setup() {
15831583 * createCanvas(200, 200, WEBGL);
1584- * myShader = strokeShader ().modify({
1584+ * myShader = baseStrokeShader ().modify({
15851585 * 'float random': `(vec2 p) {
15861586 * vec3 p3 = fract(vec3(p.xyx) * .1031);
15871587 * p3 += dot(p3, p3.yzx + 33.33);
@@ -1620,9 +1620,9 @@ p5.prototype.colorShader = function() {
16201620 * </code>
16211621 * </div>
16221622 */
1623- p5 . prototype . strokeShader = function ( ) {
1624- this . _assert3d ( 'strokeShader ' ) ;
1625- return this . _renderer . strokeShader ( ) ;
1623+ p5 . prototype . baseStrokeShader = function ( ) {
1624+ this . _assert3d ( 'baseStrokeShader ' ) ;
1625+ return this . _renderer . baseStrokeShader ( ) ;
16261626} ;
16271627
16281628/**
0 commit comments