Removing unecessary code

This commit is contained in:
samcake 2016-02-15 17:41:20 -08:00
parent b9d14b74ee
commit a740f4a6de

View file

@ -345,27 +345,6 @@ void DeferredLightingEffect::render(const render::RenderContextPointer& renderCo
{ // Setup the global lighting
setupKeyLightBatch(batch, locations->lightBufferUnit, SKYBOX_MAP_UNIT);
/*
auto globalLight = _allocatedLights[_globalLights.front()];
if (locations->ambientSphere >= 0) {
gpu::SphericalHarmonics sh = globalLight->getAmbientSphere();
if (useSkyboxCubemap && _skybox->getCubemap()->getIrradiance()) {
sh = (*_skybox->getCubemap()->getIrradiance());
}
for (int i =0; i <gpu::SphericalHarmonics::NUM_COEFFICIENTS; i++) {
batch._glUniform4fv(locations->ambientSphere + i, 1, (const float*) (&sh) + i * 4);
}
}
if (useSkyboxCubemap) {
batch.setResourceTexture(SKYBOX_MAP_UNIT, _skybox->getCubemap());
}
if (locations->lightBufferUnit >= 0) {
batch.setUniformBuffer(locations->lightBufferUnit, globalLight->getSchemaBuffer());
}*/
}
{
@ -523,17 +502,6 @@ void DeferredLightingEffect::setupKeyLightBatch(gpu::Batch& batch, int lightBuff
}
bool useSkyboxCubemap = (_skybox) && (_skybox->getCubemap());
/* if (ambientSphereBufferUnit >= 0) {
gpu::SphericalHarmonics sh = globalLight->getAmbientSphere();
if (useSkyboxCubemap && _skybox->getCubemap()->getIrradiance()) {
sh = (*_skybox->getCubemap()->getIrradiance());
}
for (int i =0; i <gpu::SphericalHarmonics::NUM_COEFFICIENTS; i++) {
batch._glUniform4fv(ambientSphereBufferUnit + i, 1, (const float*)(&sh) + i * 4);
}
}*/
if (useSkyboxCubemap && (skyboxCubemapUnit >= 0)) {
batch.setResourceTexture(skyboxCubemapUnit, _skybox->getCubemap());
}