Light Culling still doesn't work properly

This commit is contained in:
Dynamitos
2022-02-24 22:38:26 +01:00
parent 5268bb68e2
commit 84049a762c
44 changed files with 163 additions and 151 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
target_sources(SeeleEngine
target_sources(Engine
PRIVATE
Actor.cpp
Actor.h
+1 -1
View File
@@ -1,4 +1,4 @@
target_sources(SeeleEngine
target_sources(Engine
PRIVATE
Util.h
Scene.cpp
+1 -1
View File
@@ -1,4 +1,4 @@
target_sources(SeeleEngine
target_sources(Engine
PRIVATE
CameraComponent.h
CameraComponent.cpp
@@ -4,7 +4,7 @@ using namespace Seele;
Job MyOtherComponent::tick(float deltaTime) const
{
std::cout << *data << std::endl;
//std::cout << *data << std::endl;
co_return;
}
+4 -4
View File
@@ -19,13 +19,13 @@ Scene::Scene(Gfx::PGraphics graphics)
lightEnv.directionalLights[0].intensity = Vector4(1, 1, 1, 1);
lightEnv.numDirectionalLights = 1;
srand((unsigned int)time(NULL));
for(uint32 i = 0; i < 16; ++i)
for(uint32 i = 0; i < 256; ++i)
{
lightEnv.pointLights[i].colorRange = Vector4(frand(), frand(), frand(), frand() * 30);
lightEnv.pointLights[i].colorRange = Vector4(frand(), frand(), frand(), frand() * 300);
lightEnv.pointLights[i].positionWS = Vector4(frand() * 100-50, frand(), frand() * 100-50, 1);
}
lightEnv.numPointLights = 16;
lightEnv.pointLights[0].colorRange = Vector4(1, 1, 1, 1000);
lightEnv.numPointLights = 256;
lightEnv.pointLights[0].colorRange = Vector4(1, 0, 1, 1000);
lightEnv.pointLights[0].positionWS = Vector4(0, 10, 0, 1);
}
+1 -2
View File
@@ -19,7 +19,6 @@ struct DirectionalLight
struct PointLight
{
Vector4 positionWS;
Vector4 positionVS;
Vector4 colorRange;
};
@@ -46,7 +45,7 @@ public:
const std::vector<PPrimitiveComponent>& getPrimitives() const { return primitives; }
const std::vector<StaticMeshBatch>& getStaticMeshes() const { return staticMeshes; }
const LightEnv& getLightBuffer() const { return lightEnv; }
LightEnv& getLightBuffer() { return lightEnv; }
private:
std::vector<StaticMeshBatch> staticMeshes;
std::vector<PActor> rootActors;