/* Automatically generated file; do not edit */ // This vertex shader takes inputs in integer pixels, as well as // a glyph position in integer texels, and outputs // in floating point coordinates understood by the DX drawing system. struct VS_INPUT { uint2 pos :POSITION; uint2 glyph_pos :TEXCOORD0; }; struct VS_OUTPUT { float2 tile_pos :TEXCOORD0; float2 glyph_pos :TEXCOORD1; float2 out_pos :TEXCOORD2; float4 pos :SV_POSITION; }; cbuffer info :register(b0) { float2 wh; // Half width, half height of target drawable uint2 tile_offset; uint2 stipple_size; uint2 clip_offset; // unused (glyph pos is taken from input.glyph_pos) uint2 clip_size; // size of the entire glyph atlas } cbuffer output_info :register(b1) { uint2 out_offset; } VS_OUTPUT main(VS_INPUT input) { VS_OUTPUT output; output.pos.x = input.pos.x / wh.x - 1.0f; output.pos.y = -(input.pos.y / wh.y - 1.0f); output.pos.z = 0; output.pos.w = 1; output.tile_pos = input.pos - tile_offset; output.tile_pos /= (float2)stipple_size; output.glyph_pos = input.glyph_pos / (float2)clip_size; output.out_pos = input.pos - out_offset; return output; }