obs-StreamFX/data/effects/mipgen.effect

40 lines
722 B
Text
Raw Normal View History

// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2018-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// AUTOGENERATED COPYRIGHT HEADER END
2018-09-28 09:48:06 +00:00
uniform float4x4 ViewProj;
uniform texture2d image;
uniform float2 imageTexel;
uniform int level;
sampler_state def_sampler {
2021-09-07 00:58:17 +00:00
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);
}
}