mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-28 17:58:42 +00:00
Fix translation to device coords in shader
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
1f647ef24c
commit
31fb707eea
1 changed files with 2 additions and 2 deletions
|
@ -21,8 +21,8 @@ vertex QuadFragmentInput quad_vertex(
|
|||
) {
|
||||
float2 unit_vertex = unit_vertices[unit_vertex_id];
|
||||
GPUIQuad quad = quads[quad_id];
|
||||
float2 position = (unit_vertex * quad.size + quad.origin) / (uniforms->viewport_size / 2.0);
|
||||
float4 device_position = float4(position * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);
|
||||
float2 position = unit_vertex * quad.size + quad.origin;
|
||||
float4 device_position = float4(position / uniforms->viewport_size * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);
|
||||
|
||||
return QuadFragmentInput {
|
||||
device_position,
|
||||
|
|
Loading…
Reference in a new issue