processing / processing/p5.js

Add a version of Processing's loadShader() function to p5.js

Open
#6,852 8 comments 0 reactions 1 assignee View on GitHub

@Rishab87 is already working on this.

Since Dec 22, 2024.

Area:Accessibility Area:Core Feature Request
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Increasing access

It would provide a utility and convenience function. It would allow for a smaller main script, which could make things easier to manage, especially when working in the on-line editor with large shader files.

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
Feature request details

p5.js now has a createFilterShader() function where one can create a filter from just a fragment shader, which needs to be defined in the main script file. It would make sense to provide a loadFilterShader() function to allow for creating a filter shader by loading from a separate file, just like loadShader() provides that utility to accompany the createShader function. It would keep things consistent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.