shader-slang / slang

Making it easier to work with shaders
http://shader-slang.com
Other
3.22k stars 216 forks source link

File paperwork to deprecate Metal-only math functions #5733

Open cheneym2 opened 1 day ago

cheneym2 commented 1 day ago

The other week, I noticed some minor issues in the core library math functions added for Metal support. (powr(), fmax(), fmax3()) @JayKwak_NV who introduced the math functions in https://github.com/shader-slang/slang/commit/997f040f48b5c34e20ad6b0f512bb9d1ae6e6128#diff-645e6e8cf2915cbda6d0a72af868d90c90a6da0b2a277e2020dae14d2b7fd5b3 suggested that we remove them rather than fix them, and that we don't actually need to add functions from the Metal spec into Slang. I can either fix the bugs or remove the new math functions from Slang (which would be a breaking change). Please let me know the right course of action. Fix or remove? https://github.com/shader-slang/slang/issues/5580 https://github.com/shader-slang/slang/issues/5581 https://github.com/shader-slang/slang/issues/5587

JayKwak_NV — Today at 10:48 AM Sorry. I shouldn't have added them in the first place. But to remove, we will have to mark them as deprecated first, I think.

acheney_nv — Today at 10:54 AM Yes, https://shader-slang.com/community/language-change-process/ says it has to go through a deprecation phase. Actually, considering that, I think it's prudent to anyways make the planned fixes and choose to (or not to) deprecate the functions independently from that. The Slang Feature Change Process The Slang Feature Change Process

csyonghe commented 1 day ago

Let's fix the functions, I think they are good additions.