mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-06 03:29:55 -06:00
* Move all copies & resolves to rasterization. * Fix Vulkan crash. * Implement hardware resolve path for both color and depth targets.
16 lines
512 B
HLSL
16 lines
512 B
HLSL
#pragma once
|
|
|
|
#include "copy_common.hlsli"
|
|
|
|
Texture2DMS<float, SAMPLE_COUNT> g_Texture2DMSDescriptorHeap[] : register(t0, space0);
|
|
|
|
float main(in float4 position : SV_Position) : SV_Depth
|
|
{
|
|
float result = g_Texture2DMSDescriptorHeap[g_PushConstants.ResourceDescriptorIndex].Load(int2(position.xy), 0);
|
|
|
|
[unroll] for (int i = 1; i < SAMPLE_COUNT; i++)
|
|
result = min(result, g_Texture2DMSDescriptorHeap[g_PushConstants.ResourceDescriptorIndex].Load(int2(position.xy), i));
|
|
|
|
return result;
|
|
}
|