Rust-GPU / Rust-GPU/rust-gpu

[Migrated] Infrastructure for using ShaderToy as a test corpus

Open
#66 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
3.4k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1104
Old labels: mcp: proposed
Originally creatd by LegNeato on 2023-11-27T17:58:09Z 👍: 2


Proposal

Create infrastructure that translates (working) shadertoy shaders into rust-gpu (and runs?). This would make it so we have a sort of burndown chart a la https://github.com/uutils/coreutils#gnu-test-suite-compatibility and https://boajs.dev/boa/test262/ and stress test different parts of rust-gpu. Implementing enough to flip a shader from not working to working may be an easier place for contributors to start, and seeing shaders work is neat!

Feasibility

The shadertoy api looks pretty straightforward to implement from the runner side: https://www.shadertoy.com/howto.

I'm not sure how easy the transpiling will be, but there is https://github.com/phaazon/glsl/tree/master/glsl/src/transpiler and spot checks on some shadertoy shaders doesn't look too crazy. We could probably allowlist or denylist.

Implementation

I wanted to open this for comments before starting on an implementation.

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.

Research direction

Start by reviewing the Shadertoy API documentation and the referenced GLSL transpiler at glsl/src/transpiler. Define how working Shadertoy shaders would be translated, executed, and tracked as a compatibility corpus. Done means the infrastructure can demonstrate which shaders work and support incremental improvements to rust-gpu.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, computer-graphics, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.