You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this is on sokol-shdc to handle, or an odd incompatibility with the SPIR-V tools, because I'd imagine it isn't impossible to just use that struct-returning function on wgsl and add a .fract .
When compiling a GLSL shader to WGSL, if the shader is using the
modf
function, the errorunhandled GLSL.std.450 instruction 35
is thrown.As far as I understand, this is because the
modf
in GLSL gets compiled to the SPIR-V instruction Modf, (which apparently is deprecated? https://registry.khronos.org/SPIR-V/specs/unified1/GLSL.std.450.html) and is an instruction that returns a single value, while themodf
in WGSL returns the fractional and whole parts (https://www.w3.org/TR/WGSL/#modf-builtin) which I would assume is the ModfStruct instruction in SPIR-V.I don't know if this is on sokol-shdc to handle, or an odd incompatibility with the SPIR-V tools, because I'd imagine it isn't impossible to just use that struct-returning function on wgsl and add a
.fract
.Attached is the shader that causes trouble.
modf.txt
The text was updated successfully, but these errors were encountered: