Fly camera (as in games, Unreal, Unity): right drag turns it where it stands, WASD (Q / E down, up) while held and the arrows any time move where it looks, the wheel goes forward and back (never creeping to a stop), Shift + wheel sets how fast every way of moving goes (kept), Alt + right drag orbits round what's picked; it keeps track of what it looks at (the near plane and shade in corners go by what's nearest). Close up in Rendered no longer turns into a pattern: the shade in corners reaches a share of the view (its +1 a share of the reach in the engine). The grid made again: four sets of lines, each line's look only from how far apart it and its like are on the screen (no jumps as the view moves or the steps change, no gaps, soft edges), pieces short near the eye. F3 and Escape close the command search (the engine takes Escape first). fry_hold / fry_mouse / fry_orbit target for trying it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-21 09:53:22 +02:00
commit 415f8fa352
9 changed files with 206 additions and 80 deletions

View file

@ -56,7 +56,8 @@ void main() {
vec3 v = viewPos(q) - p;
float vv = dot(v, v);
float falloff = max(0.0, 1.0 - vv / (pc.radius * pc.radius));
occlusion += max(0.0, dot(v, n) - 0.01 * p.z) / (vv + 1.0) * falloff;
// (+ a little against dividing by nothing: its share of the reach, so any scale looks the same)
occlusion += max(0.0, dot(v, n) - 0.01 * p.z) / (vv + pc.radius * pc.radius * 0.0017) * falloff;
}
float ao = max(0.0, 1.0 - 2.0 * occlusion / float(kSamples) * pc.radius * 0.6);
o_ao = vec4(mix(1.0, ao * ao, pc.strength));