Clean up
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
struct VSOut
|
||||
{
|
||||
float4 position : SV_Position;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
cbuffer FrameConstants : register(b0)
|
||||
{
|
||||
float width;
|
||||
float height;
|
||||
float frameIndex;
|
||||
float frameReserved;
|
||||
};
|
||||
|
||||
cbuffer ShaderParameters : register(b1)
|
||||
{
|
||||
float amount;
|
||||
float3 parameterPadding;
|
||||
};
|
||||
|
||||
Texture2D<float4> inputFrame : register(t0);
|
||||
SamplerState linearClampSampler : register(s0);
|
||||
|
||||
VSOut fullscreen_vs(uint vertexId : SV_VertexID)
|
||||
{
|
||||
float2 positions[3] =
|
||||
{
|
||||
float2(-1.0, -1.0),
|
||||
float2(-1.0, 3.0),
|
||||
float2( 3.0, -1.0)
|
||||
};
|
||||
|
||||
float2 uvs[3] =
|
||||
{
|
||||
float2(0.0, 1.0),
|
||||
float2(0.0, -1.0),
|
||||
float2(2.0, 1.0)
|
||||
};
|
||||
|
||||
VSOut output;
|
||||
output.position = float4(positions[vertexId], 0.0, 1.0);
|
||||
output.uv = uvs[vertexId];
|
||||
return output;
|
||||
}
|
||||
|
||||
float4 main(VSOut input) : SV_Target
|
||||
{
|
||||
float4 color = inputFrame.Sample(linearClampSampler, input.uv);
|
||||
float luminance = dot(color.rgb, float3(0.2126, 0.7152, 0.0722));
|
||||
float3 gray = luminance.xxx;
|
||||
color.rgb = lerp(color.rgb, gray, saturate(amount));
|
||||
return color;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"id": "builtin.black_white",
|
||||
"name": "Black & White",
|
||||
"version": 1,
|
||||
"entry": "main",
|
||||
"type": "fullscreen_pixel",
|
||||
"parameters": [
|
||||
{
|
||||
"id": "amount",
|
||||
"label": "Amount",
|
||||
"type": "float",
|
||||
"default": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user