mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 09:33:45 +02:00
Removing unecessary code
This commit is contained in:
parent
b9d14b74ee
commit
a740f4a6de
1 changed files with 0 additions and 32 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue