processing / processing/processing4
Request: add a createShader( String [] vertSrc, String [] fragSrc ) function like p5.js has
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 494
- 派生
- 183
- 平均合并
- 4 小时 39 分钟
- 30 天内合并 PR
- 3
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查文档化的 loadShader() API 和现有的 PShader 构造函数,这两者都在 issue 中提到。比较它们对着色器源以及 vertex shader 默认值的处理方式。当 sketch 能够从 String[] 源构造着色器,同时支持显式的 vertex/fragment 形式和请求中描述的推断形式时,工作就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api, computer-graphics
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100