diff --git a/assets/shaders/PBRClusteredShader.frag b/assets/shaders/PBRClusteredShader.frag index 2f2d22a..82e5efa 100644 --- a/assets/shaders/PBRClusteredShader.frag +++ b/assets/shaders/PBRClusteredShader.frag @@ -209,8 +209,9 @@ void main(){ //Adding any emissive if there is an assigned map radianceOut += emissive; - if(slices){ - FragColor = vec4(colors[uint(mod(zTile, 8.0))], 1.0); + if(slices) + { + FragColor = vec4(colors[uint(mod(float(zTile), 8.0))], 1.0); } else{ FragColor = vec4(radianceOut, 1.0); diff --git a/src/scene.cpp b/src/scene.cpp index a6cbfab..370770e 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -394,8 +394,8 @@ void Scene::loadSceneModels(const json &sceneConfigJson ){ for (unsigned int i = 0; i < modelCount; ++i){ //get model mesh and material info json currentModel = sceneConfigJson["models"][i]; - modelMesh = currentModel["mesh"]; - IBL = currentModel["IBL"]; + modelMesh = currentModel["mesh"].get(); + IBL = currentModel["IBL"].get(); modelName = modelMesh.substr(0, modelMesh.find_last_of('.')); diff --git a/src/shader.cpp b/src/shader.cpp index f357fb7..3c1f757 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -66,7 +66,7 @@ bool Shader::setup(const std::string vertexPath, const std::string fragmentPath, glGetShaderiv(vertexShader, GL_COMPILE_STATUS, &success); if(!success){ glGetShaderInfoLog(vertexShader, 512, NULL, infoLog); - printf("Vertex shader compilation failed %s\n", infoLog ); + printf("Vertex shader compilation failed at %s: %s\n", vertexPath.c_str(), infoLog ); return false; } @@ -77,7 +77,7 @@ bool Shader::setup(const std::string vertexPath, const std::string fragmentPath, glGetShaderiv(fragmentShader, GL_COMPILE_STATUS, &success); if(!success){ glGetShaderInfoLog(fragmentShader, 512, NULL, infoLog); - printf("Fragment shader compilation failed %s\n", infoLog ); + printf("Fragment shader compilation failed at %s: %s\n", fragmentPath.c_str(), infoLog); return false; }