mirror of https://github.com/Xaymar/obs-StreamFX
55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
|
//------------------------------------------------------------------------------
|
||
|
// Uniforms
|
||
|
//------------------------------------------------------------------------------
|
||
|
|
||
|
// View Projection Matrix
|
||
|
uniform float4x4 ViewProj;
|
||
|
|
||
|
//------------------------------------------------------------------------------
|
||
|
// Samplers
|
||
|
//------------------------------------------------------------------------------
|
||
|
sampler_state PointRepeatSampler {
|
||
|
Filter = Point;
|
||
|
AddressU = Repeat;
|
||
|
AddressV = Repeat;
|
||
|
};
|
||
|
|
||
|
sampler_state PointClampSampler {
|
||
|
Filter = Point;
|
||
|
AddressU = Clamp;
|
||
|
AddressV = Clamp;
|
||
|
};
|
||
|
|
||
|
sampler_state LinearRepeatSampler {
|
||
|
Filter = Linear;
|
||
|
AddressU = Repeat;
|
||
|
AddressV = Repeat;
|
||
|
};
|
||
|
|
||
|
sampler_state LinearClampSampler {
|
||
|
Filter = Linear;
|
||
|
AddressU = Clamp;
|
||
|
AddressV = Clamp;
|
||
|
};
|
||
|
|
||
|
//------------------------------------------------------------------------------
|
||
|
// Structures
|
||
|
//------------------------------------------------------------------------------
|
||
|
struct VertexData {
|
||
|
float4 pos : POSITION;
|
||
|
float2 uv : TEXCOORD0;
|
||
|
};
|
||
|
|
||
|
//------------------------------------------------------------------------------
|
||
|
// Vertex Shaders
|
||
|
//------------------------------------------------------------------------------
|
||
|
VertexData DefaultVertexShader(VertexData vtx) {
|
||
|
vtx.pos = mul(float4(vtx.pos.xyz, 1.0), ViewProj);
|
||
|
return vtx;
|
||
|
};
|
||
|
|
||
|
//------------------------------------------------------------------------------
|
||
|
// Color Conversion
|
||
|
//------------------------------------------------------------------------------
|
||
|
|