Voxel cache rewrite
This commit is contained in:
+8
-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,19 +110,19 @@ bool3 min_mask(float3 val)
|
||||
return val == min_val;
|
||||
}
|
||||
|
||||
[[vk::binding(0, 1)]]
|
||||
[[vk::binding(0, 2)]]
|
||||
[[format("rgba32f")]]
|
||||
WTexture2D<float4> target_texture;
|
||||
|
||||
[[vk::binding(1, 1)]]
|
||||
[[vk::binding(1, 2)]]
|
||||
[[format("rgba32f")]]
|
||||
RWTexture2D<float4> gbuffer_position;
|
||||
|
||||
[[vk::binding(2, 1)]]
|
||||
[[vk::binding(2, 2)]]
|
||||
[[format("rgba32f")]]
|
||||
RWTexture2D<float4> gbuffer_albedo;
|
||||
|
||||
[[vk::binding(3, 1)]]
|
||||
[[vk::binding(3, 2)]]
|
||||
[[format("rgba32f")]]
|
||||
RWTexture2D<float4> gbuffer_normal;
|
||||
|
||||
@@ -154,6 +155,7 @@ void gi(uint32_t3 location: SV_DispatchThreadID, uint32_t3 local_location: SV_Gr
|
||||
let albedo = gbuffer_albedo.Load(location.xy);
|
||||
target_texture.Store(location.xy, albedo);
|
||||
return;
|
||||
|
||||
let illumination = dot(float3(0., 1., 0.), normal.xyz);
|
||||
|
||||
let view_dir = pos.xyz - constants.cam_pos;
|
||||
|
||||
Reference in New Issue
Block a user