mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 07:30:51 +08:00
Moved Shaders src to CodeWalker.Shaders
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: DumpToTexture.hlsl
|
||||
//
|
||||
// The PS for converting CS output buffer to a texture, used in CS path of
|
||||
// HDRToneMappingCS11 sample
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//--------------------------------------------------------------------------------------
|
||||
StructuredBuffer<float4> buffer : register( t0 );
|
||||
|
||||
struct QuadVS_Output
|
||||
{
|
||||
float4 Pos : SV_POSITION;
|
||||
float2 Tex : TEXCOORD0;
|
||||
};
|
||||
|
||||
cbuffer cbPS : register( b0 )
|
||||
{
|
||||
uint4 g_param;
|
||||
};
|
||||
|
||||
float4 main( QuadVS_Output Input ) : SV_TARGET
|
||||
{
|
||||
// To calculate the buffer offset, it is natural to use the screen space coordinates,
|
||||
// Input.Pos is the screen space coordinates of the pixel being written
|
||||
return buffer[ (Input.Pos.x - 0.5) + (Input.Pos.y - 0.5) * g_param.x ];
|
||||
}
|
||||
Reference in New Issue
Block a user