Skip to content
Merged
17 changes: 17 additions & 0 deletions package/Shaders/VR/InSceneOverlay.ps.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// VR In-Scene Overlay Pixel Shader
// Samples overlay texture with alpha blending support

Texture2D shaderTexture : register(t0);
SamplerState sampleType : register(s0);

struct PS_INPUT
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};

float4 main(PS_INPUT input) : SV_TARGET
{
float4 color = shaderTexture.Sample(sampleType, input.uv);
return color;
}
27 changes: 27 additions & 0 deletions package/Shaders/VR/InSceneOverlay.vs.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// VR In-Scene Overlay Vertex Shader
// Simple pass-through shader for rendering overlay quad in VR

cbuffer MatrixBuffer : register(b0)
{
matrix wvp;
};

struct VS_INPUT
{
float3 pos : POSITION;
float2 uv : TEXCOORD0;
};

struct PS_INPUT
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};

PS_INPUT main(VS_INPUT input)
{
PS_INPUT output;
output.pos = mul(float4(input.pos, 1.0f), wvp);
output.uv = input.uv;
return output;
}
Loading