Adding AABB to meshlets
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -11,6 +11,7 @@ struct MeshletDescription
|
||||
|
||||
struct MeshData
|
||||
{
|
||||
AABB boundingBox;
|
||||
uint numMeshlets;
|
||||
uint meshletOffset;
|
||||
uint firstIndex;
|
||||
|
||||
Reference in New Issue
Block a user