Basic light culling but without the culling
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user