Basic light culling but without the culling

This commit is contained in:
Dynamitos
2021-06-12 18:51:29 +02:00
parent 22adb08bfc
commit 7f019a28b4
17 changed files with 122 additions and 63 deletions
+1 -10
View File
@@ -19,23 +19,14 @@ Scene::Scene(Gfx::PGraphics graphics)
lightEnv.directionalLights[0].color = Vector4(1, 1, 1, 1);
lightEnv.directionalLights[0].direction = Vector4(1, 1, 0, 1);
lightEnv.directionalLights[0].intensity = Vector4(1, 1, 1, 1);
lightEnv.numDirectionalLights = 0;
lightEnv.numDirectionalLights = 1;
srand((unsigned int)time(NULL));
for(uint32 i = 0; i < MAX_POINT_LIGHTS/2; ++i)
{
lightEnv.pointLights[i].colorRange = Vector4(frand(), frand(), frand(), frand() * 30);
lightEnv.pointLights[i].positionWS = Vector4(frand() * 100-50, frand(), frand() * 100-50, 1);
lightEnv.pointLights[i].positionVS = Vector4(frand() * 100-50, frand(), frand() * 100-50, 1);
}
lightEnv.numPointLights = MAX_POINT_LIGHTS/2;
BulkResourceData lightInit;
UniformBufferCreateInfo structuredInfo;
lightInit.size = sizeof(LightEnv);
lightInit.data = (uint8*)&lightEnv;
structuredInfo.resourceData = lightInit;
structuredInfo.bDynamic = false;
lightBuffer = graphics->createUniformBuffer(structuredInfo);
}
Scene::~Scene()