Trying to switch to 16 bit indices
This commit is contained in:
@@ -35,7 +35,7 @@ struct AABB
|
||||
float3 max;
|
||||
float pad1;
|
||||
bool insideFrustum(float4x4 transform, Frustum frustum)
|
||||
{
|
||||
{
|
||||
float4 corners[8];
|
||||
corners[0] = mul(transform, float4(min.x, min.y, min.z, 1.0f));
|
||||
corners[1] = mul(transform, float4(min.x, min.y, max.z, 1.0f));
|
||||
@@ -47,12 +47,10 @@ struct AABB
|
||||
corners[7] = mul(transform, float4(max.x, max.y, max.z, 1.0f));
|
||||
for(int i = 0; i < 8; ++i)
|
||||
{
|
||||
float3 adjusted = corners[i].xyz / corners[i].w;
|
||||
if(frustum.pointInside(adjusted))
|
||||
if(frustum.pointInside(corners[i].xyz))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import Bounding;
|
||||
|
||||
struct MeshletDescription
|
||||
{
|
||||
BoundingSphere bounding;
|
||||
AABB bounding;
|
||||
uint32_t vertexCount;
|
||||
uint32_t primitiveCount;
|
||||
uint32_t vertexOffset;
|
||||
@@ -13,7 +13,7 @@ struct MeshletDescription
|
||||
|
||||
struct MeshData
|
||||
{
|
||||
BoundingSphere bounding;
|
||||
AABB bounding;
|
||||
uint32_t numMeshlets;
|
||||
uint32_t meshletOffset;
|
||||
uint32_t firstIndex;
|
||||
@@ -39,7 +39,7 @@ struct Scene
|
||||
StructuredBuffer<MeshData> meshData;
|
||||
StructuredBuffer<MeshletDescription> meshletInfos;
|
||||
StructuredBuffer<uint8_t> primitiveIndices;
|
||||
StructuredBuffer<uint32_t> vertexIndices;
|
||||
StructuredBuffer<uint16_t> vertexIndices;
|
||||
};
|
||||
|
||||
ParameterBlock<Scene> pScene;
|
||||
|
||||
Reference in New Issue
Block a user