Skip to content

Request: add a createShader( String [] vertSrc, String [] fragSrc ) function like p5.js has #397

Open
@processing-bot

Description

@processing-bot

Created by: scudly

Now that we have multi-line strings, it is practical to include shader code directly in sketches (or even to construct them programmatically) rather than reading from an external file. The current publicly supported and documented loadShader() API only cleanly supports reading shaders from files. Ideally, we would also have a createShader( String[] fragSrc ) that infers the type and provides a vertex shader as the current loadShader() does.

Passing the source as an array of strings seems more general than taking it as a single, multi-line string and is trivial enough to express in code. It also matches the existing PShader constructors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions