Skip to content

Commit e674f70

Browse files
committed
Fix some bad function signatures for built in GLSL functions
1 parent 0bb6acd commit e674f70

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/webgl/ShaderGenerator.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ function shadergenerator(p5, fn) {
366366
args = args.map((arg, i) => {
367367
if (!isShaderNode(arg)) {
368368
const typeName = properties.args[i] === 'genType' ? inferredType : properties.args[i];
369+
console.log(typeName);
369370
arg = nodeConstructors[typeName](arg);
370371
}
371372
return arg;
@@ -809,12 +810,12 @@ function shadergenerator(p5, fn) {
809810
// 'isnan': {},
810811
'log': { args: ['genType'], returnType: 'genType', isp5Function: true},
811812
'log2': { args: ['genType'], returnType: 'genType', isp5Function: false},
812-
'max': { args: ['genType'], returnType: 'genType', isp5Function: true},
813-
'min': { args: ['genType'], returnType: 'genType', isp5Function: true},
814-
'mix': { args: ['genType'], returnType: 'genType', isp5Function: false},
813+
'max': { args: ['genType', 'genType'], returnType: 'genType', isp5Function: true},
814+
'min': { args: ['genType', 'genType'], returnType: 'genType', isp5Function: true},
815+
'mix': { args: ['genType', 'genType', 'genType'], returnType: 'genType', isp5Function: false},
815816
// 'mod': {},
816817
// 'modf': {},
817-
'pow': { args: ['genType'], returnType: 'genType', isp5Function: true},
818+
'pow': { args: ['genType', 'genType'], returnType: 'genType', isp5Function: true},
818819
'round': { args: ['genType'], returnType: 'genType', isp5Function: true},
819820
'roundEven': { args: ['genType'], returnType: 'genType', isp5Function: false},
820821
// 'sign': {},

0 commit comments

Comments
 (0)