Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for mat / scalar #4817

Open
greggman opened this issue Aug 13, 2024 · 1 comment
Open

Support for mat / scalar #4817

greggman opened this issue Aug 13, 2024 · 1 comment
Labels
wgsl WebGPU Shading Language Issues
Milestone

Comments

@greggman
Copy link
Contributor

WGSL doesn't currently support mat / scalar though it does support mat * scalar. Apparently this is because MSL and SPIR-V don't support it. GLSL, HLSL do. Is it trivial to transform the expression to mat * (1.0 / scalar)?

I ran into this porting GLSL shaders to WGSL.

@greggman greggman added the wgsl WebGPU Shading Language Issues label Aug 13, 2024
@kdashg
Copy link
Contributor

kdashg commented Aug 27, 2024

WGSL 2024-08-27 Minutes
  • DN: Additionally for this, 1. Our sense is linear algebra has add and mul, but less so division. 2. Which division will it be: teh full precision / or the more approximate reciprocal. If we choose one then the other community will soon call for the other, which ends up being ugly.
  • JB: Kinda surprised you view division here as different enough conceptually. Might as well “scale down” as “scale up”.
  • DN: Fine to drop my point 1. Not worth arguing.
  • JP: Our sense is M3+; same with the clamp and shift issues above.
  • KG: We can pick M3+ here and change this or other around later as needed.

@kdashg kdashg added this to the Milestone 3+ milestone Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wgsl WebGPU Shading Language Issues
Projects
None yet
Development

No branches or pull requests

2 participants