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
+7 -11
View File
@@ -58,15 +58,11 @@ struct PointLight : ILightEnv
}
};
#define MAX_DIRECTIONAL_LIGHTS 4
#define MAX_POINT_LIGHTS 256
struct Lights
{
DirectionalLight directionalLights[MAX_DIRECTIONAL_LIGHTS];
PointLight pointLights[MAX_POINT_LIGHTS];
uint numDirectionalLights;
uint numPointLights;
};
layout(set = INDEX_LIGHT_ENV, binding = 0, std430)
ConstantBuffer<Lights> gLightEnv;
StructuredBuffer<DirectionalLight> directionalLights;
layout(set = INDEX_LIGHT_ENV, binding = 1, std430)
ConstantBuffer<uint> numDirectionalLights;
layout(set = INDEX_LIGHT_ENV, binding = 2, std430)
StructuredBuffer<PointLight> pointLights;
layout(set = INDEX_LIGHT_ENV, binding = 3, std430)
ConstantBuffer<uint> numPointLights;