diff --git a/data/shader/phong.fsh b/data/shader/phong.fsh index 47129fb..88c5207 100644 --- a/data/shader/phong.fsh +++ b/data/shader/phong.fsh @@ -27,6 +27,11 @@ uniform samplerCubeShadow shadowMap_cube6; uniform samplerCubeShadow shadowMap_cube7; uniform samplerCubeShadow shadowMap_cube8; uniform samplerCubeShadow shadowMap_cube9; +uniform samplerCubeShadow shadowMap_cube10; +uniform samplerCubeShadow shadowMap_cube11; +uniform samplerCubeShadow shadowMap_cube12; +uniform samplerCubeShadow shadowMap_cube13; +uniform samplerCubeShadow shadowMap_cube14; uniform vec3 ambientColor; uniform float ambientFactor; uniform float diffuseFactor; @@ -314,6 +319,21 @@ void main() if (i == 9 && i(10); + depth_cubeMaps = std::vector(15); for (unsigned int i = 0; isetMinFilter(GL_NEAREST); @@ -219,8 +219,8 @@ void Graphics::bindTextureUnits(){ glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &number_of_texture_units); printf("Your graphics card supports %d texture units.\n", number_of_texture_units); // Exit if we need more texture units - if (number_of_texture_units < (int)textureCount + 18) { - printf("You need at least %d texture units to run this application. Exiting\n", textureCount + 18); + if (number_of_texture_units < (int)textureCount + 27) { + printf("You need at least %d texture units to run this application. Exiting\n", textureCount + 27); exit(-1); } for(unsigned int i = 0; isize(); i++) { @@ -237,16 +237,16 @@ void Graphics::bindTextureUnits(){ } } flamePostShader->use(); - flamePostShader->setTexture("light_fbo", light_fbo_color_texture, textureCount + 17); + flamePostShader->setTexture("light_fbo", light_fbo_color_texture, textureCount + 22); skydomeShader->use(); - skydomeShader->setTexture("dayTexture", level->getSkydome()->getDayTexture(), textureCount + 18); - skydomeShader->setTexture("nightTexture", level->getSkydome()->getNightTexture(), textureCount + 19); + skydomeShader->setTexture("dayTexture", level->getSkydome()->getDayTexture(), textureCount + 23); + skydomeShader->setTexture("nightTexture", level->getSkydome()->getNightTexture(), textureCount + 24); loadingShader->use(); - loadingShader->setTexture("screen", loadingScreen, textureCount + 20); - loadingShader->setTexture("screenContinue", loadingContinueScreen, textureCount + 21); - printf("This application used %d texture units.\n", textureCount + 21); + loadingShader->setTexture("screen", loadingScreen, textureCount + 25); + loadingShader->setTexture("screenContinue", loadingContinueScreen, textureCount + 26); + printf("This application used %d texture units.\n", textureCount + 27); } void Graphics::renderLoadingScreen() {