You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building the project on LinuxMint 20.1 (Ubuntu 20.04) I got this error:
Building CXX object src/Skybolt/SkyboltVisTests/CMakeFiles/SkyboltVisTests.dir/QuadTreeTileLoaderTests.cpp.o
In file included from /home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/../../../Assets/Core/Shaders/Brdfs/PrincipledBrdfDirectionalLight.h:13,
from /home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/PrincipledBrdfTests.cpp:26:
/home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/../../../Assets/Core/Shaders/Util/Specular.h: In function ‘glm::vec3 fresnelSchlickRoughness(float, glm::vec3, float)’:
/home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/../../../Assets/Core/Shaders/Util/Specular.h:57:58: error: cannot convert ‘glm::vec<3, float, glm::packed_highp>::rgb’ from type ‘glm::vec<3, float, glm::packed_highp> (glm::vec<3, float, glm::packed_highp>::)() const’ to type ‘glm::vec3’ {aka ‘glm::vec<3, float, glm::packed_highp>’}
57 | return clamp( a0 + F0 * ( a1 - a0 ), vec3(0), vec3(1) ).rgb;
I was able to go around this by simply adding round parentheses:
return clamp( a0 + F0 * ( a1 - a0 ), vec3(0), vec3(1) ).rgb();
But I'm not sure if this is the right way.
The text was updated successfully, but these errors were encountered:
This issue is now fixed on the master branch. Visual Studio allows usage of .rgb as a member, but other compilers do not. I added a macro definition to change rgb to rgb() when the shader is compiled with C++.
When building the project on LinuxMint 20.1 (Ubuntu 20.04) I got this error:
Building CXX object src/Skybolt/SkyboltVisTests/CMakeFiles/SkyboltVisTests.dir/QuadTreeTileLoaderTests.cpp.o
In file included from /home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/../../../Assets/Core/Shaders/Brdfs/PrincipledBrdfDirectionalLight.h:13,
from /home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/PrincipledBrdfTests.cpp:26:
/home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/../../../Assets/Core/Shaders/Util/Specular.h: In function ‘glm::vec3 fresnelSchlickRoughness(float, glm::vec3, float)’:
/home/cel/Projekty/var/Skybolt/master/Skybolt-master/src/Skybolt/SkyboltVisTests/../../../Assets/Core/Shaders/Util/Specular.h:57:58: error: cannot convert ‘glm::vec<3, float, glm::packed_highp>::rgb’ from type ‘glm::vec<3, float, glm::packed_highp> (glm::vec<3, float, glm::packed_highp>::)() const’ to type ‘glm::vec3’ {aka ‘glm::vec<3, float, glm::packed_highp>’}
57 | return clamp( a0 + F0 * ( a1 - a0 ), vec3(0), vec3(1) ).rgb;
I was able to go around this by simply adding round parentheses:
return clamp( a0 + F0 * ( a1 - a0 ), vec3(0), vec3(1) ).rgb();
But I'm not sure if this is the right way.
The text was updated successfully, but these errors were encountered: