Voxel cache rewrite
This commit is contained in:
+9
-6
@@ -85,9 +85,10 @@ RWStructuredBuffer<uint32_t> attributes_pool[2];
|
||||
RWStructuredBuffer<RequestBufferElement> request_buffer;
|
||||
[[vk::binding(3, 0)]]
|
||||
RWStructuredBuffer<uint32_t> usage_buffer;
|
||||
[[vk::binding(4, 0)]]
|
||||
|
||||
[[vk::binding(0, 1)]]
|
||||
RWStructuredBuffer<StructurePointer> structure_table_pointer;
|
||||
[[vk::binding(5, 0)]]
|
||||
[[vk::binding(1, 1)]]
|
||||
RWStructuredBuffer<Atomic<uint32_t>> structure_table_request_buffer;
|
||||
|
||||
ByteColor fetch_color(uint32_t index, uint32_t child_index)
|
||||
@@ -109,15 +110,15 @@ bool3 min_mask(float3 val)
|
||||
return val == min_val;
|
||||
}
|
||||
|
||||
[[vk::binding(0, 1)]]
|
||||
[[vk::binding(0, 2)]]
|
||||
[[format("rgba32f")]]
|
||||
WTexture2D<float4> gbuffer_position;
|
||||
|
||||
[[vk::binding(1, 1)]]
|
||||
[[vk::binding(1, 2)]]
|
||||
[[format("rgba32f")]]
|
||||
WTexture2D<float4> gbuffer_albedo;
|
||||
|
||||
[[vk::binding(2, 1)]]
|
||||
[[vk::binding(2, 2)]]
|
||||
[[format("rgba32f")]]
|
||||
WTexture2D<float4> gbuffer_normal;
|
||||
|
||||
@@ -174,8 +175,10 @@ void ray_march_compute(uint32_t3 location: SV_DispatchThreadID, uint32_t3 local_
|
||||
{
|
||||
// Gather
|
||||
let hit_pos = hit.hit_pos;
|
||||
|
||||
let hit_normal = fetch_normal(hit.node_index, hit.child_index);
|
||||
let hit_albedo = fetch_color(hit.node_index, hit.child_index).float_color;
|
||||
var hit_albedo = float4(0.);
|
||||
hit_albedo = fetch_color(hit.node_index, hit.child_index).float_color;
|
||||
// let hit_albedo = hit.color;
|
||||
|
||||
gbuffer_position.Store(location.xy, float4(hit_pos, 1.));
|
||||
|
||||
Reference in New Issue
Block a user