Priyank.Jain2 Posted June 29, 2017 Posted June 29, 2017 In my geometry shader I am adding vertices using a function, something like this void CreateVertex(int i, float uSign, float vSign) { OUT_POSITION = IN_GEOM_POSITION(i) + IN_GEOM_POSITION(i).w * float4( uSign * uOffset + vSign * vOffset, 0, 0 ); . . . but shader is throwing error ERROR: 0:1481: '[' : layout must be declared before indexing gl_in built-in array Althogh exporting the shader shows correct output (glsl) void CreateVertex(int i, float uSign, float vSign) { gl_Position = gl_in[i].gl_Position + gl_in[i].gl_Position.w * vec4( uSign * uOffset + vSign * vOffset, 0, 0 ); . . . Also if I provide index directly then it is working fine IN_GEOM_POSITION(0). Am I missing something? PS: The error is present on following hardware: Intel® HD Graphics 4400, Surface Pro (Intel HD 4600). But working fine on: NVIDIA Quadro K1100M
silent Posted June 29, 2017 Posted June 29, 2017 Priyank.Jain2 That behavior can be also a sign of some GPU driver bug. Could you please provide a small reproducible test scene (can be even based on empty new project) and specify your SDK version? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Priyank.Jain2 Posted June 30, 2017 Author Posted June 30, 2017 Yes that may be the reason, Check list of GPU's we tried this on, Graphics API : OpenGL GPU Driver version:Intel® HD Graphics 4400, driver 10.18.14.4432 Intel® HD Graphics 5000, driver 20.19.15.4331 Intel® HD Graphics family, driver 20.19.15.4483 Intel® HD Graphics 520, driver 20.19.15.453 SDK version : 2.3.1 I will try to create a test sample, but that may took some time. Sorry for that.
Recommended Posts