We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cdea3b commit 0eb1598Copy full SHA for 0eb1598
src/glsl/builtin.js
@@ -140,6 +140,10 @@ export class BuiltIn {
140
return fastCalc(Math.ceil, x);
141
}
142
143
+ round(x) {
144
+ return fastCalc(Math.round, x);
145
+ }
146
+
147
fract(x) {
148
return fastCalc((x) => x - Math.floor(x), x);
149
@@ -391,4 +395,8 @@ export class BuiltIn {
391
395
notEqual(x, y) {
392
396
return !this.equal(x, y);
393
397
398
399
+ discard() {
400
+ throw new Error('discard');
401
394
402
0 commit comments