Skip to content

Instantly share code, notes, and snippets.

View Carandiru0's full-sized avatar
👽
Space, the Final Frontier.

Jason Tully Carandiru0

👽
Space, the Final Frontier.
View GitHub Profile
@Carandiru0
Carandiru0 / mem.h
Last active June 12, 2022 05:46
optimized memcpy_threaded, memset_threaded
/* Copyright (C) 2022 Jason Tully - All Rights Reserved
* You may use, distribute and modify this code under the
* terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
*
*
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/
or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
*/
@Carandiru0
Carandiru0 / hilbertCA.shadertoy.glsl
Created October 31, 2021 22:50
Hilbert CA [shadertoy] (basis)
// http://bit.ly/supersinfulsilicon
// hilbert CA by Jason Tully is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
// Based on a work at https://www.shadertoy.com/view/ssVXWd
// Permissions beyond the scope of this license may be available at http://bit.ly/supersinfulsilicon
// http://bit.ly/supersinfulsilicon
// hilbert CA by Jason Tully is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
// Based on a work at https://www.shadertoy.com/view/ssVXWd
@Carandiru0
Carandiru0 / gist:c1a7d51283a07641b7173c87e176641e
Last active October 31, 2021 20:39
optimized bellcurve function (including desmos) [0.0....1.0] input, [0.0....1.0] output
// optimized bellcurve function
// https://www.desmos.com/calculator/xxwdiqa4sk
STATIC_INLINE_PURE float const __vectorcall bellcurve(float x) // 0..1 input to 0..1 output
{
// mu is 0.0 (centered) sigma is 0.5
constexpr float const c(XM_PI / -1.25331414f); // optimized magic value - bellcurve perfect match (to six digits of precision)
// removes sqrt
// https://www.desmos.com/calculator/xxwdiqa4sk
@Carandiru0
Carandiru0 / new_rotated_rect_fill_algo.pde
Created February 28, 2021 02:03
New Rotated / Oriented RECT Filling Algorithm (Simple & Efficient)
// - supersinfulsilicon - Jason Tully
// New Filled Rect w/ Orientation Algorithm
// -prototyping working version-
// http://bit.ly/supersinfulsilicon
// shader is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
// Based on a work at https://www.shadertoy.com/view/wdSczm
// Permissions beyond the scope of this license may be available at http://bit.ly/supersinfulsilicon