Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

Commits on main

LT21: detail cross-fades on every surface and from where the GPU measures. raea's generated fragments for ShaderExt (surfaceShader: surface and lit hooks) and ShaderMaterial (shade) never called Bevy's visibility-range dither, so a part drawn with them (the city's facades, glass and ground) drew both levels fully inside a fade band and cut one at the band's edge, a pop: on the 540p fly over 1917 Berlin, detail made one-frame spikes of 45, 20, 19 and 17 tiles at frames 41, 117, 122 and 157 where the JS levels made theirs at 58, 106, 112 and 148. Both fragments now call visibility_range_dither under @if(VISIBILITY_RANGE_DITHER), as Bevy's own pbr fragment does (a source with its own @fragment calls it itself). And Bevy's GPU dither measures from a mesh's origin (mesh_world_from_local[3]) while its CPU check measured from the box's centre under use_aabb, which raea-sys-lod set for meshes baked in world coordinates (a city tile's origin is the world's, its geometry hundreds of metres off), so the two disagreed. Now every range is measured from the origin (use_aabb off) and moved by how much farther the origin is than what the part is measured to: its nearest edge (edge), the mesh's own middle when its origin lies outside its bounds, else nothing; the move can be negative, and a range never goes below 0. A moved range is rewritten once the eye has gone a third of its way to the nearest fading band, which bounds a stale move's error (the distance moves as far as the eye, a move twice as far). RAEA_LOD_DEBUG=time now times apply inside it: between two systems ordered around it others ran, so it read 1 ms with no Details at all.
shinyobjectz committed 11 days ago
c77c485
2161a52