2018-09-28 09:48:06 +00:00
|
|
|
uniform float4x4 ViewProj;
|
2018-09-27 03:11:37 +00:00
|
|
|
uniform texture2d image;
|
|
|
|
uniform float2 imageTexel;
|
2020-04-25 06:15:20 +00:00
|
|
|
uniform int level;
|
2018-09-27 03:11:37 +00:00
|
|
|
|
2020-04-25 06:15:20 +00:00
|
|
|
sampler_state def_sampler {
|
2021-09-07 00:58:17 +00:00
|
|
|
Filter = Linear;
|
|
|
|
AddressU = Clamp;
|
|
|
|
AddressV = Clamp;
|
2018-09-27 03:11:37 +00:00
|
|
|
};
|
|
|
|
|
2020-04-25 06:15:20 +00:00
|
|
|
struct VertexData {
|
2018-09-27 03:11:37 +00:00
|
|
|
float4 pos : POSITION;
|
|
|
|
float2 uv : TEXCOORD0;
|
|
|
|
};
|
|
|
|
|
2020-04-25 06:15:20 +00:00
|
|
|
VertexData VSDefault(VertexData vtx)
|
2018-09-27 03:11:37 +00:00
|
|
|
{
|
2020-04-25 06:15:20 +00:00
|
|
|
vtx.pos = mul(float4(vtx.pos.xyz, 1.0), ViewProj);
|
|
|
|
return vtx;
|
2018-09-27 03:11:37 +00:00
|
|
|
}
|
|
|
|
|
2020-04-25 06:15:20 +00:00
|
|
|
float4 PSDefault(VertexData vtx) : TARGET
|
2018-09-27 03:11:37 +00:00
|
|
|
{
|
2020-04-25 06:15:20 +00:00
|
|
|
return image.SampleLevel(def_sampler, vtx.uv, level);
|
2018-09-27 03:11:37 +00:00
|
|
|
}
|
|
|
|
|
2020-04-25 06:15:20 +00:00
|
|
|
technique Draw
|
2018-09-27 03:11:37 +00:00
|
|
|
{
|
|
|
|
pass
|
|
|
|
{
|
2020-04-25 06:15:20 +00:00
|
|
|
vertex_shader = VSDefault(vtx);
|
|
|
|
pixel_shader = PSDefault(vtx);
|
2018-09-27 03:11:37 +00:00
|
|
|
}
|
|
|
|
}
|