Skip to content

Instantly share code, notes, and snippets.

@maluoi
Created August 27, 2021 03:37
Show Gist options
  • Save maluoi/e146f7df008db04eab606f6a2afb30e4 to your computer and use it in GitHub Desktop.
Save maluoi/e146f7df008db04eab606f6a2afb30e4 to your computer and use it in GitHub Desktop.
StereoKit Blit Shader
//--name = sk/blit/identity
//--source = white
Texture2D source : register(t0);
SamplerState source_s : register(s0);
struct vsIn {
float4 pos : SV_Position;
float2 uv : TEXCOORD0;
};
struct psIn {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
psIn vs(vsIn input) {
psIn o;
o.pos = input.pos;
o.uv = input.uv;
return o;
}
float4 ps(psIn input) : SV_TARGET {
return source.Sample(source_s, input.uv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment