wgsl-tooling-wg / wesl-spec

A portable and modular superset of WGSL
BSD 3-Clause "New" or "Revised" License
18 stars 3 forks source link

Address common community WGSL string interpolation cases in WESL #50

Open mighdoll opened 1 week ago

mighdoll commented 1 week ago

Community projects in WGSL (and other shader communities) typically rely on string interpolation to inject some host specific variation into shaders.

Let's enumerate the common string interpolation use cases in this issue (and make separate issues for the uncommon cases) and then document them on the spec site.

We originally planned to address these common cases by standardizing a string interpolation mechanism (see SimpleTemplating). I think the current discussions lean towards more precise language features than string insertion, but either way a clear understanding of the use cases will help validate our solutions. When we agree on spec features to address these community use cases, we can document them alongside.

k2d222 commented 1 week ago

Some of what I have seen (mostly glsl)

mighdoll commented 1 week ago

pixijs: host code controlled linking via string insertion here pixijs: aligning vert and frag @location indices here pixijs: custom code generation for blur filter: here

mighdoll commented 1 week ago

nanite-webgpu

mighdoll commented 1 week ago

lygia

mighdoll commented 1 week ago

webgpu-torch

mighdoll commented 1 week ago

pbmpm

mighdoll commented 1 week ago

frostbitten-hair-webgpu

mighdoll commented 1 week ago

gpu-curtains

mighdoll commented 1 week ago

alpenglow

mighdoll commented 1 week ago

Egrogia

mighdoll commented 1 week ago

strahl

mighdoll commented 1 week ago

luma.gl

mighdoll commented 1 week ago

vello

mighdoll commented 1 week ago

webgpu-particles

mighdoll commented 1 week ago

webgpu-marching-cubes

mighdoll commented 1 week ago

webgpu-volume

mighdoll commented 1 week ago

frac_gen

mighdoll commented 1 week ago

rerun

mighdoll commented 1 week ago

kmeans-gpu

mighdoll commented 1 week ago

[pixijs-filters]()

mighdoll commented 1 week ago

cell_simulation

mighdoll commented 1 week ago

GraphWaGu