This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// - 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 |