Allow resizing the image during conversion

This commit is contained in:
loki
2021-05-04 10:21:56 +02:00
parent 900d59b3ac
commit 1b7e103ef6
3 changed files with 15 additions and 57 deletions

View File

@@ -22,7 +22,7 @@ struct PS_INPUT
//--------------------------------------------------------------------------------------
float PS(PS_INPUT frag_in) : SV_Target
{
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
float3 rgb = image.Sample(def_sampler, frag_in.tex, 0).rgb;
float y = dot(color_vec_y.xyz, rgb) + color_vec_y.w;
return y;

View File

@@ -15,8 +15,11 @@ PS_INPUT VS(uint vI : SV_VERTEXID)
float x = idHigh * 4.0 - 1.0;
float y = idLow * 4.0 - 1.0;
float u = idHigh * 2.0;
float v = 1.0 - idLow * 2.0;
PS_INPUT vert_out;
vert_out.pos = float4(x, y, 0.0, 1.0);
vert_out.tex = float2(idHigh, idLow);
vert_out.tex = float2(u, v);
return vert_out;
}