Greg.Mildenhall Posted February 21, 2018 Share Posted February 21, 2018 Our shader compilers are complaining about redefinitions of SCALE_UV and DEPTH_RESOLUTION_ZERO when we run on GPUS other than NVIDIA (for which the GLSL compilers are notoriously slack). I doubt this line will be working the way it was intended in ssr.frag or ssrtgi.frag: #ifndef SCALE_UV || DEPTH_RESOLUTION_ZERO Link to comment
silent Posted February 22, 2018 Share Posted February 22, 2018 Hi Greg, To remove this warning you will need slightly patch the #ifndef SCALE_UV || DEPTH_RESOLUTION_ZERO define, so it will look more like this: #ifndef SCALE_UV || DEPTH_RESOLUTION_ZERO #undef SCALE_UV // add this line #undef DEPTH_RESOLUTION_ZERO // add this line #define SCALE_UV 1.0f #define DEPTH_RESOLUTION_ZERO 0 #endif Thanks for the report! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Greg.Mildenhall Posted February 22, 2018 Author Share Posted February 22, 2018 Shouldn't the line I quoted be something like #if !defined(SCALE_UV) || !defined(DEPTH_RESOLUTION_ZERO) then? Link to comment
silent Posted February 22, 2018 Share Posted February 22, 2018 Greg, I believe proposed fix should be enough. I've tested on Intel Iris Pro 580 with latest Windows 10 drivers and can't see any warnings in console anymore. This fix will be also available with an upcoming SDK update. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Greg.Mildenhall Posted February 23, 2018 Author Share Posted February 23, 2018 Yes, doing the #undefs will prevent the warnings. But have you tested that the code actually does what you intend it to? I expect it's ignoring everything after SCALE_UV because an #ifdef can only apply to a single token. And even if _your_ compiler is broken enough to do what you want here, other compilers are likely to behave differently or refuse to compile it. Link to comment
Recommended Posts