Compare commits
2 Commits
d6a3f7465d
...
12b32acb2b
Author | SHA1 | Date | |
---|---|---|---|
|
12b32acb2b | ||
|
b06759de76 |
@ -59,7 +59,6 @@ CSS: /style.css
|
||||
- [Line and circle rasterization](http://www.sunshine2k.de/coding/java/Bresenham/RasterisingLinesCircles.pdf)
|
||||
- [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)
|
||||
- [Awesome article on hashtables](https://thenumb.at/Hashtables/)
|
||||
- [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/)
|
||||
- [Monotone meshing](https://blackflux.wordpress.com/tag/monotone-meshing/)
|
||||
@ -98,3 +97,9 @@ CSS: /style.css
|
||||
- [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)
|
||||
- [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)
|
||||
|
@ -51,12 +51,16 @@ struct sqrtwave {
|
||||
uint32_t u;
|
||||
} v;
|
||||
} init_sqrtwave(float frequency, float phase, float amplitude) {
|
||||
struct sqrtwave r;
|
||||
r.w = init_sinewave(frequency, phase, 1.f);
|
||||
v.f = r.w.s;
|
||||
a.f = amplitude;
|
||||
r.v.u = (a.u & 0x7fffffff) | (v.u & 0x80000000);
|
||||
return r;
|
||||
struct sqrtwave r;
|
||||
union {
|
||||
float f;
|
||||
uint32_t u;
|
||||
} v, a;
|
||||
r.w = init_sinewave(frequency, phase, 1.f);
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user