Compare commits

..

No commits in common. "12b32acb2bd4e1eb9e8760b8971e92f79ac68dac" and "d6a3f7465da6a8270201a1fefbf7e0ff843bb4d6" have entirely different histories.

2 changed files with 7 additions and 16 deletions

View File

@ -59,6 +59,7 @@ CSS: /style.css
- [Line and circle rasterization](http://www.sunshine2k.de/coding/java/Bresenham/RasterisingLinesCircles.pdf) - [Line and circle rasterization](http://www.sunshine2k.de/coding/java/Bresenham/RasterisingLinesCircles.pdf)
- [Occlusion culling of Vintage Story](https://github.com/tyronx/occlusionculling) - [Occlusion culling of Vintage Story](https://github.com/tyronx/occlusionculling)
- [Minecraft work on cave occlusion, in 2 parts](https://tomcc.github.io/2014/08/31/visibility-1.html) - [Minecraft work on cave occlusion, in 2 parts](https://tomcc.github.io/2014/08/31/visibility-1.html)
- [Awesome article on hashtables](https://thenumb.at/Hashtables/)
- [Order independent blending technique](https://jcgt.org/published/0002/02/09/) - [Order independent blending technique](https://jcgt.org/published/0002/02/09/)
- [High performance voxel engine](https://nickmcd.me/2021/04/04/high-performance-voxel-engine/) - [High performance voxel engine](https://nickmcd.me/2021/04/04/high-performance-voxel-engine/)
- [Monotone meshing](https://blackflux.wordpress.com/tag/monotone-meshing/) - [Monotone meshing](https://blackflux.wordpress.com/tag/monotone-meshing/)
@ -97,9 +98,3 @@ CSS: /style.css
- [Granular buffer memory control](https://registry.khronos.org/OpenGL/extensions/ARB/ARB_sparse_buffer.txt) - [Granular buffer memory control](https://registry.khronos.org/OpenGL/extensions/ARB/ARB_sparse_buffer.txt)
- [Window pos](https://people.freedesktop.org/~marcheu/extensions/ARB/window_pos.html) - [Window pos](https://people.freedesktop.org/~marcheu/extensions/ARB/window_pos.html)
- [Optimized fixed function fog](https://people.freedesktop.org/~marcheu/extensions/doc/fog_coord.html) - [Optimized fixed function fog](https://people.freedesktop.org/~marcheu/extensions/doc/fog_coord.html)
## data representations
- [Efficient varying-length integers](https://john-millikin.com/vu128-efficient-variable-length-integers)
- [Awesome article on hashtables](https://thenumb.at/Hashtables/)
- [Crit-bit trees](https://cr.yp.to/critbit.html)
- [QP tries](https://dotat.at/prog/qp/README.html)

View File

@ -51,16 +51,12 @@ struct sqrtwave {
uint32_t u; uint32_t u;
} v; } v;
} init_sqrtwave(float frequency, float phase, float amplitude) { } init_sqrtwave(float frequency, float phase, float amplitude) {
struct sqrtwave r; struct sqrtwave r;
union { r.w = init_sinewave(frequency, phase, 1.f);
float f; v.f = r.w.s;
uint32_t u; a.f = amplitude;
} v, a; r.v.u = (a.u & 0x7fffffff) | (v.u & 0x80000000);
r.w = init_sinewave(frequency, phase, 1.f); return r;
v.f = r.w.s;
a.f = amplitude;
r.v.u = (a.u & 0x7fffffff) | (v.u & 0x80000000);
return r;
} }
/* Use floating point bit representation to infer sign, all other bits are set to amplitude */ /* Use floating point bit representation to infer sign, all other bits are set to amplitude */