[Vulkan] Remove old Vulkan code, change shaders directory, create empty Vulkan backend
This commit is contained in:
19
src/xenia/gpu/shaders/stretch_gamma.ps.hlsl
Normal file
19
src/xenia/gpu/shaders/stretch_gamma.ps.hlsl
Normal file
@@ -0,0 +1,19 @@
|
||||
Texture2D<float4> xe_texture : register(t0);
|
||||
Texture1D<float3> xe_gamma_ramp : register(t1);
|
||||
SamplerState xe_sampler_linear_clamp : register(s0);
|
||||
cbuffer XeStretchGammaRootConstants : register(b0) {
|
||||
float xe_gamma_ramp_inv_size;
|
||||
};
|
||||
|
||||
float4 main(float2 xe_texcoord : TEXCOORD) : SV_Target {
|
||||
float4 color =
|
||||
xe_texture.SampleLevel(xe_sampler_linear_clamp, xe_texcoord, 0.0f);
|
||||
// The center of the first texel of the LUT contains the value for 0, and the
|
||||
// center of the last texel contains the value for 1.
|
||||
color.rgb = color.rgb * (1.0f - xe_gamma_ramp_inv_size) +
|
||||
(0.5 * xe_gamma_ramp_inv_size);
|
||||
color.r = xe_gamma_ramp.SampleLevel(xe_sampler_linear_clamp, color.r, 0.0f).r;
|
||||
color.g = xe_gamma_ramp.SampleLevel(xe_sampler_linear_clamp, color.g, 0.0f).g;
|
||||
color.b = xe_gamma_ramp.SampleLevel(xe_sampler_linear_clamp, color.b, 0.0f).b;
|
||||
return color;
|
||||
}
|
||||
Reference in New Issue
Block a user