Refactored dx12 to use c++ versions of the api and not C + various tweaks (using antigravity + gemini)
This commit is contained in:
Binary file not shown.
@@ -5,7 +5,12 @@ cbuffer RootConstants : register(b0, space0)
|
||||
{
|
||||
row_major float4x4 ViewProjection;
|
||||
uint BufferIndex;
|
||||
uint _Padding[3];
|
||||
uint TextureIndex;
|
||||
uint VertexOffset; // Base vertex for indexed drawing with bindless buffers
|
||||
uint _Padding; // Padding for alignment
|
||||
float2 Scale; // 2D scale factor
|
||||
float2 Translate; // 2D translation
|
||||
};
|
||||
|
||||
|
||||
#endif // ROOT_CONSTANTS_HLSL
|
||||
|
||||
@@ -11,9 +11,8 @@ Output main(uint vertexIndex : SV_VertexID)
|
||||
Output output;
|
||||
|
||||
// Retrieve the buffer using SM6.6 bindless syntax
|
||||
// We use index 0 as the sample app doesn't pass push constants yet.
|
||||
uint bufferIndex = 0;
|
||||
ByteAddressBuffer buffer = ResourceDescriptorHeap[bufferIndex];
|
||||
// Use BufferIndex from RootConstants (pushed via SetPushConstants)
|
||||
ByteAddressBuffer buffer = ResourceDescriptorHeap[BufferIndex];
|
||||
|
||||
// Read position from buffer (Index * stride)
|
||||
// Stride = 2 float (pos) + 4 float (color) = 6 * 4 = 24 bytes ?
|
||||
|
||||
Reference in New Issue
Block a user