TSL: Wrong compilation of min(...)
and max(...)
with 3 or more parameters
#28728
Labels
min(...)
and max(...)
with 3 or more parameters
#28728
Description
TSL allows many parameters to functions
min(...)
andmax(...)
. Using more than 2 parameters, however, fails:The GLSL error is:
The WGSL error is (significantly shortened):
Suggested solutions
min(a,b,c,d,...)
intomin(a,min(b,min(c,...)))
; and the same formax
Untested situation
Chained
min(...)
andmax(...)
are not testedReproduction steps
min
ormax
with more than 3 parameters:Code
(see the live example)
Live example
Minimal code. Does not render anything meaningful, just generates the error messages.
https://codepen.io/boytchev/pen/RwmyQLY
Screenshots
Demonstration that only the first three parameters are compiled:
Using the TSL editor in GLSL mode:
Using the TSL editor in WGSL mode:
Version
r165
Device
Desktop
Browser
Chrome, Firefox
OS
Windows
The text was updated successfully, but these errors were encountered: