pyshader icon indicating copy to clipboard operation
pyshader copied to clipboard

Write modern GPU shaders in Python!

Results 11 pyshader issues
Sort by recently updated
recently updated
newest added

Obviously, the bytecode emitted by Python 3.9 has changed somewhat again, so we need to update ...

It would be very useful if it's possible to define layout as part of the function definition. It could be something like: ```python @python2shader def compute_shader_multiply( index: ("input", "GlobalInvocationId", ivec3),...

**Edit: Given this has been fixed, and works correctly with the stdlib functions, the issue can be focused mainly on documenting these functions as they are currently not documented.** I...

SpirV supports specialization: setting constants at runtime, can be useful?

When I started this, I thought that with allowing code to call other (python-defined) functions (#8) would solve all problems that we normally see for composing shaders from different snippets....

* [x] Basic arithmetic #16 * [x] Casting #16 * [x] Tuple swapping (`a, b = b, a`) * [ ] Setting vector attributes (`color.a = 1.0`) * [x] In-place...

In #35 we added control flow. One ideas was to let ternary operations (`.. if .. else ..`) be translated to `co_select`: Choose between two objects depending on the truth...

https://gpuweb.github.io/gpuweb/wgsl.html Well, there it is! Do we need to do anything in response?

Or ... maybe not. GLSL modules have one entry point, so we'd exclude compiling to GLSL. At the least wait until we know if WSL supports this too. Pro's: *...