89 const float image_offset[2],
90 const float image_resolution[2],
91 float r_uv_to_texture[4][4])
const override
94 float display_resolution[2];
95 float image_display_offset[2];
98 const float scale_x = display_resolution[0] / region->winx;
99 const float scale_y = display_resolution[1] / region->winy;
100 const float translate_x = ((region->winx - display_resolution[0]) * 0.5f + snode->
xof +
101 image_display_offset[0]) /
103 const float translate_y = ((region->winy - display_resolution[1]) * 0.5f + snode->
yof +
104 image_display_offset[1]) /
107 r_uv_to_texture[0][0] = scale_x;
108 r_uv_to_texture[1][1] = scale_y;
109 r_uv_to_texture[3][0] = translate_x;
110 r_uv_to_texture[3][1] = translate_y;