mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 04:24:26 +00:00
Far out stays steady: the grid's lines worked out from small numbers (its square's middle a whole number of kilometres from the world's, found in doubles; where on it from there), so far from the origin they no longer turn grainy and shake; the sun's shadow maps snap to their texels in doubles; packaging reads the version from project.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ee56ed4005
commit
1ee38c966c
8 changed files with 67 additions and 55 deletions
|
|
@ -9,7 +9,7 @@ PUSH_BLOCK {
|
|||
vec4 up; // camera up, w = texture index (bits)
|
||||
} pc;
|
||||
layout(location = 0) out vec2 v_uv;
|
||||
layout(location = 1) out vec3 v_world;
|
||||
layout(location = 1) out vec2 v_rel; // (a grid: where on it, from its middle)
|
||||
const vec2 kQuad[6] = vec2[](vec2(-1,-1), vec2(1,-1), vec2(1,1), vec2(-1,-1), vec2(1,1), vec2(-1,1));
|
||||
void main() {
|
||||
vec2 q = kQuad[VERTEX_ID];
|
||||
|
|
@ -23,6 +23,6 @@ void main() {
|
|||
}
|
||||
v_uv = q * 0.5 + 0.5;
|
||||
v_uv.y = 1.0 - v_uv.y;
|
||||
v_world = world;
|
||||
v_rel = pc.color.a < 0.0 ? q * pc.posSize.w : vec2(0.0);
|
||||
gl_Position = pc.viewProj * vec4(world, 1.0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue