Skip to content

Commit 951f6d7

Browse files
author
Carlos Scheidegger
committed
builtin atomics need element() operation
1 parent 43a60ef commit 951f6d7

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/shade/fragCoord.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ Shade.fragCoord = function() {
77
evaluate: function() {
88
throw new Error("evaluate undefined for fragCoord");
99
},
10+
element: function(i) {
11+
return this.at(i);
12+
},
1013
compile: function(ctx) {
1114
},
12-
json_key: function() { return "fragCoord"; }
15+
_json_key: function() { return 'fragCoord'; }
1316
});
1417
};

src/shade/pointCoord.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Shade.pointCoord = function() {
99
evaluate: function() {
1010
throw new Error("evaluate undefined for pointCoord");
1111
},
12+
element: function(i) {
13+
return this.at(i);
14+
},
1215
_json_key: function() { return 'pointCoord'; }
1316
});
1417
};

0 commit comments

Comments
 (0)