SamplerCube cube_texture; cbuffer Uniforms { float4x4 projection; float4x4 view; } struct VertexStageOutput { float4 sv_position : SV_Position; float3 vertex_pos : VertexPosition; }; [shader("vertex")] VertexStageOutput vertex_main(float3 pos: STD_POSITION) { VertexStageOutput output; output.vertex_pos = pos; float4x4 proj_view = mul(projection, view); output.sv_position = mul(proj_view, float4(pos, 1.0)).xyww; return output; } [shader("fragment")] float4 fragment_main(float3 vertex_pos: VertexPosition) : SV_Target { return cube_texture.Sample(vertex_pos); }