Greggman

Results 495 comments of Greggman

There is no emulation. There is just * `@interpolate(flat, first)` - disallowed in compat * `@interpolate(flat)` - the default, same as `@interpolate(flat, first)` - so disallowed in compat * `@interpolate(flat,...

GLSL ES didn't have it either. I'd just stick ``` const pi = radians(180.0); const tau = radians(360.0); ``` at the top of my shader. Not saying WGSL shouldn't have...

It's `Math.PI` in JS not `Math.Pi` Not sure if that was a transcription error above.

I think I ran into this issue as follows. I had code like this ``` struct Vertex { @builtin(position) position: vec4f, }; ``` And it was working. Later I added...

I feel like you're taking this specific example and ignoring the idea because of a bad example. We have xyzw and rgba. Some languages also have stpq. Why only those?...

By that argument then we should get rid of swizzles. Users can use structures if they want x,y,z,w or r,g,b,a You don't need swizzles. If you do need them, then...

bump... I'm running into this issue too. Example ``` let color = array( vec4f(1, 0, 0, 1), // red vec4f(1, 1, 0, 1), // yellow vec4f(0, 1, 0, 1), //...

If we're playing code golf this works 😛 ```js function getUsage(obj, id) { return Object.entries(obj) .filter(([,b]) => id & b) .map(([k]) => k) .join(' | '); } > getUsage(GPUBufferUsage, GPUBufferUsage.COPY_SRC...

> This PR can be merged now? Browsers are already shipping WebGPU support with WGSL. I think this is pretty far out of date. Are you looking for answers to...

I don't disagree that it uses memory. The amount of memory seems negligible compared to buffers and textures and it was already there in WebGL/OpenGL. Even JavaScript has `function.toString()`