Skip to content

Limit Scope of Default Uniforms #5279

Open
@JetStarBlues

Description

@JetStarBlues

How would this new feature help increase access to p5.js?

Makes writing custom shaders more transparent.
Currently there are a couple of uniform names that are used by the default shaders. If a user uses these names in their program, the uniform values they set will get overwritten with the default values (and their program won't behave as they expect it to).

Most appropriate sub-area of p5.js?

  • WebGL

Feature enhancement details:

The default shaders declare and use some uniforms. These reserved names are not known to a user. Rather than telling the user not to use this seemingly arbitrary list of reserved names, a better solution is to just not set these default uniforms when a user-defined shader is used (via shader()).

More discussion on this can be found on the related issue on the p5.js-website repo.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Documentation

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions