Trying to add fluid simulation

This commit is contained in:
2026-04-12 20:49:02 +02:00
parent 056589a6f9
commit ac317a3829
65 changed files with 2708 additions and 371 deletions
-1
View File
@@ -21,7 +21,6 @@ struct ViewParameter
uint frameIndex;
float time;
};
layout(set=0)
ParameterBlock<ViewParameter> pViewParams;
float4 worldToModel(float4x4 inverseTransform, float4 world)
-1
View File
@@ -71,7 +71,6 @@ struct LightEnv
Texture2D brdfLUT;
SamplerState lutSampler;
};
layout(set=3)
ParameterBlock<LightEnv> pLightEnv;
interface IBRDF
-1
View File
@@ -14,7 +14,6 @@ struct MaterialResources
SamplerState samplerArray[512];
StructuredBuffer<float> floatArray;
};
layout(set=4)
ParameterBlock<MaterialResources> pResources;
Texture2D getMaterialTextureParameter(uint index)
+15 -14
View File
@@ -45,20 +45,6 @@ struct MeshletCullingInfo
}
};
struct DrawCallOffsets
{
uint instanceOffset;
uint textureOffset;
uint samplerOffset;
uint floatOffset;
};
#ifdef RAY_TRACING
layout(shaderRecordEXT)
#else
layout(push_constant)
#endif
ConstantBuffer<DrawCallOffsets> pOffsets;
struct Scene
{
StructuredBuffer<float> positions;
@@ -73,6 +59,21 @@ struct Scene
};
ParameterBlock<Scene> pScene;
struct DrawCallOffsets
{
uint instanceOffset;
uint textureOffset;
uint samplerOffset;
uint floatOffset;
};
#ifdef RAY_TRACING
// Shader record buffers are accessed via a different mechanism and don't use descriptor set bindings
layout(set = 15, shaderRecordEXT)
#else
layout(push_constant)
#endif
ConstantBuffer<DrawCallOffsets> pOffsets;
uint32_t encodePrimitive(uint32_t meshletId)
{
return meshletId;
@@ -34,5 +34,4 @@ struct StaticMeshVertexData
StructuredBuffer<uint16_t> color;
StructuredBuffer<uint16_t> texCoords[MAX_TEXCOORDS];
};
layout(set = 1)
ParameterBlock<StaticMeshVertexData> pVertexData;