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 am unsure if we should allow for this, since it can change how the callee's body looks quite dramatically
functioninterpolate(t: number,cyclic: boolean){'use gpu';if(cyclic){returnstd.fract(t);}returnstd.saturate(t);}functionmain(){'use gpu';// The caller determines if a parameter is comptime-knownreturninterpolate(0.5,tgpu.comptimeValue(false));}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Main ideas:
Local definitions
Default parameters
Parameters initialized with a value wrapped in
tgpu.comptimeValuewould be available at comptime.Parameters passed into shellless functions
I am unsure if we should allow for this, since it can change how the callee's body looks quite dramatically
All reactions