obs-StreamFX/data/effects/mipgen.effect
Michael Fabian 'Xaymar' Dirks 91c9df3097 project: Apply Coding Guidelines
2023-04-05 18:51:13 +02:00

35 lines
568 B
Text

uniform float4x4 ViewProj;
uniform texture2d image;
uniform float2 imageTexel;
uniform int level;
sampler_state def_sampler {
Filter = Linear;
AddressU = Clamp;
AddressV = Clamp;
};
struct VertexData {
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};
VertexData VSDefault(VertexData vtx)
{
vtx.pos = mul(float4(vtx.pos.xyz, 1.0), ViewProj);
return vtx;
}
float4 PSDefault(VertexData vtx) : TARGET
{
return image.SampleLevel(def_sampler, vtx.uv, level);
}
technique Draw
{
pass
{
vertex_shader = VSDefault(vtx);
pixel_shader = PSDefault(vtx);
}
}