Describe the bug
In the example patch you can see what's going on. I have a simple tesselated plane rendered with RenderGeometry which is deformed with the PerlinAreaDeform op. If you set the calc normals flag, it fails with the following message:
[LoadingStatus] finished loading 1 assets in 0.069s
[LoadingStatus] finished loading 1 assets in 0.236s
[platform] slow request: GET /api/changelog?num=1: 427ms
[cgl_shader] bad line: 306: norm=mod1930_calcNormal(mod1930_p.xyz,norm.xyz,tangent,bitangent);
[cgl_shader] bad line: 319: tangent=mod1930_newTangent;
[cgl_shader] bad line: 320: bitangent=mod1930_newBiTangent;
[cgl_shader] ERROR: 0:306: 'tangent' : undeclared identifier ERROR: 0:306: 'bitangent' : undeclared identifier ERROR: 0:306: 'mod1930_calcNormal' : no matching overloaded function found ERROR: 0:306: '=' : dimension mismatch ERROR: 0:306: 'assign' : cannot convert from 'const mediump float' to 'out highp 3-component vector of float' ERROR: 0:319: 'tangent' : undeclared identifier ERROR: 0:319: 'assign' : l-value required (can't modify a const) ERROR: 0:319: '=' : dimension mismatch ERROR: 0:319: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float' ERROR: 0:320: 'bitangent' : undeclared identifier ERROR: 0:320: 'assign' : l-value required (can't modify a const) ERROR: 0:320: '=' : dimension mismatch ERROR: 0:320: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float'
[cgl_shader] Wireframe Material copy shader linking fail...
How To Reproduce
Open Example patch
Click on Calc Normals input of PerlinAreaDeform.
Platform
Chrome on Mac
Dev Tools
Console messages after crash:
VERTEX_SHADER
cables.js:1011 [cgl_shader] bad line: `306: norm=mod1930_calcNormal(mod1930_p.xyz,norm.xyz,tangent,bitangent);
`
cables.js:1011 [cgl_shader] bad line: `319: tangent=mod1930_newTangent;
`
cables.js:1011 [cgl_shader] bad line: `320: bitangent=mod1930_newBiTangent;
`
cables.js:12773 Shader error Wireframe Material copy ERROR: 0:306: 'tangent' : undeclared identifier<br/>ERROR: 0:306: 'bitangent' : undeclared identifier<br/>ERROR: 0:306: 'mod1930_calcNormal' : no matching overloaded function found<br/>ERROR: 0:306: '=' : dimension mismatch<br/>ERROR: 0:306: 'assign' : cannot convert from 'const mediump float' to 'out highp 3-component vector of float'<br/>ERROR: 0:319: 'tangent' : undeclared identifier<br/>ERROR: 0:319: 'assign' : l-value required (can't modify a const)<br/>ERROR: 0:319: '=' : dimension mismatch<br/>ERROR: 0:319: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float'<br/>ERROR: 0:320: 'bitangent' : undeclared identifier<br/>ERROR: 0:320: 'assign' : l-value required (can't modify a const)<br/>ERROR: 0:320: '=' : dimension mismatch<br/>ERROR: 0:320: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float'<br/>
Link to simple, reproducible example patch https://cables.gl/edit/ZZy3Hn
Describe the bug In the example patch you can see what's going on. I have a simple tesselated plane rendered with RenderGeometry which is deformed with the PerlinAreaDeform op. If you set the calc normals flag, it fails with the following message:
[LoadingStatus] finished loading 1 assets in 0.069s [LoadingStatus] finished loading 1 assets in 0.236s [platform] slow request: GET /api/changelog?num=1: 427ms [cgl_shader] bad line: 306: norm=mod1930_calcNormal(mod1930_p.xyz,norm.xyz,tangent,bitangent); [cgl_shader] bad line: 319: tangent=mod1930_newTangent; [cgl_shader] bad line: 320: bitangent=mod1930_newBiTangent; [cgl_shader] ERROR: 0:306: 'tangent' : undeclared identifier ERROR: 0:306: 'bitangent' : undeclared identifier ERROR: 0:306: 'mod1930_calcNormal' : no matching overloaded function found ERROR: 0:306: '=' : dimension mismatch ERROR: 0:306: 'assign' : cannot convert from 'const mediump float' to 'out highp 3-component vector of float' ERROR: 0:319: 'tangent' : undeclared identifier ERROR: 0:319: 'assign' : l-value required (can't modify a const) ERROR: 0:319: '=' : dimension mismatch ERROR: 0:319: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float' ERROR: 0:320: 'bitangent' : undeclared identifier ERROR: 0:320: 'assign' : l-value required (can't modify a const) ERROR: 0:320: '=' : dimension mismatch ERROR: 0:320: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float' [cgl_shader] Wireframe Material copy shader linking fail...
How To Reproduce
Platform
Dev Tools Console messages after crash: