Allow resizing the image during conversion
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user