Hi, I’ve looked a bit at this now and I sort of understand what you are looking for
- Currently, the render script calculates a projection matrix by means of scaling the projection based on a zoom value calculated from the window size, which means that the sprite scales according to window size. So, in the /render/default.render_script, I changed the projection matrix to a orthographic projection from absolute window width/height values:
render.set_projection(vmath.matrix4_orthographic(0, render.get_window_width(), 0, render.get_window_height(), -1, 1))
- For the background quad, I think you want to remove the projection completely and just modify the UV coordinates to show a sub-rectangle of the background texture. So, I changed the model and go position to 0,0,0 and just output the vertex position as-is in the vertex shader:
gl_Position = vec4(position.xyz, 1.0);
- In the fragment shader, the UV coordinates you get from the quad will always be 0…1 in s and t across the render view, so you need to recalculate this range to the absolute region that the window is displaying:
vec2 texture_size_absolute = vec2(512.0,512.0);
var_texcoord1 = (gl_FragCoord.st / texture_size_absolute);
Note that this uv is not based from the center of the screen, meaning it doesn’t anchor the objects based from the center of the window but rather from the bottom left corner.
Let me know if this makes any sense or if I am deranged