diff options
| author | yum <yum.food.vr@gmail.com> | 2025-06-05 19:42:36 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-06-05 19:42:36 -0700 |
| commit | 8b7ae8db808d76ddea503f94e142c7d37c1b43d3 (patch) | |
| tree | 9c60f09943b314d47bd5f8df732465831d5a566d /math.cginc | |
| parent | 50b0b6c8b292e966a43fe56c6e0bf0a20c1d5b62 (diff) | |
more work on fog & c30
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -8,6 +8,10 @@ #define HALF_PI (PI * 0.5)
#define PHI 1.618033989
#define SQRT_2_RCP 0.707106781
+#define TWO_OVER_THREE 0.6666666666666666f
+#define SQRT_3_OVER_2 0.8660254037844386f
+#define EULERS_CONSTANT 2.718281828
+
float pow5(float x)
{
@@ -285,9 +289,6 @@ float3 cmykToRgb(float4 cmyk) { // Cartesian to cube hexagonal coordinates.
// Based on this: https://backdrifting.net/post/064_hex_grids
-#define TWO_OVER_THREE 0.6666666666666666f
-#define SQRT_3_OVER_2 0.8660254037844386f
-
float3 cart_to_hex(float2 cart) {
float p = cart.x;
float q = dot(cart, float2(0.5f, SQRT_3_OVER_2));
|
