Adding AABB to meshlets

This commit is contained in:
Dynamitos
2023-12-11 14:45:37 +01:00
parent eceb0f6bcc
commit 3feb331927
17 changed files with 63 additions and 51 deletions
+2
View File
@@ -3,7 +3,9 @@ import Common;
struct AABB
{
float3 min;
float pad0;
float3 max;
float3 pad1;
bool insideFrustum(float4x4 transform, Frustum frustum)
{
float3 corners[8];
+1 -1
View File
@@ -30,7 +30,7 @@ struct PointLight : ILightEnv
float3 lightDir_TS = mul(params.tbn, lightDir_WS);
float d = length(lightDir_TS);
float illuminance = max(1 - d / colorRange.w, 0);
return brdf.evaluate(params.tbn, params.viewDir_TS, normalize(lightDir_TS), colorRange.xyz);
return illuminance * brdf.evaluate(params.tbn, params.viewDir_TS, normalize(lightDir_TS), colorRange.xyz);
}
bool insidePlane(Plane plane)
+1
View File
@@ -11,6 +11,7 @@ struct MeshletDescription
struct MeshData
{
AABB boundingBox;
uint numMeshlets;
uint meshletOffset;
uint firstIndex;