diff options
| author | yum <yum.food.vr@gmail.com> | 2025-01-14 21:01:26 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-01-14 21:01:28 -0800 |
| commit | 333562544ef1b71a7a4d7ce1ece533bef98ce0da (patch) | |
| tree | c9620943f8a772db0da777e1aa759b30adb17925 /mochie_shadow_caster.cginc | |
| parent | ab441140208d6dd8317f328f40a25c6054f1a304 (diff) | |
im going to kill myself
attempt to fix hypotrochoid normals
key insight is that multiplying normal by transpose(invert(jacobian)) of
transform should work, but it fucking doesn't
Diffstat (limited to 'mochie_shadow_caster.cginc')
| -rw-r--r-- | mochie_shadow_caster.cginc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mochie_shadow_caster.cginc b/mochie_shadow_caster.cginc index 64f6350..0d15d41 100644 --- a/mochie_shadow_caster.cginc +++ b/mochie_shadow_caster.cginc @@ -1,5 +1,8 @@ +#include "UnityCG.cginc" + #include "atrix256.cginc" #include "gerstner.cginc" +#include "trochoid_math.cginc" #ifndef __MOCHIE_SHADOW_CASTER_INC #define __MOCHIE_SHADOW_CASTER_INC @@ -60,6 +63,11 @@ v2f vert (appdata v){ return (v2f) (0.0 / 0.0); } #endif +#if defined(_TROCHOID) + { + v.vertex.xyz = cyl2_to_troch_map(cyl_to_cyl2_map(cart_to_cyl_map(v.vertex.xyz))); + } +#endif #if !defined(_SCROLL) && defined(_GIMMICK_GERSTNER_WATER) { GerstnerParams p = getGerstnerParams(); |
