From d1ecda540ddd6e9ab53f7981de65c3e435c1132c Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 11 Oct 2025 13:04:57 -0700 Subject: more stuff --- test.slang | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 test.slang (limited to 'test.slang') diff --git a/test.slang b/test.slang deleted file mode 100644 index ee971ce..0000000 --- a/test.slang +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __CUSTOM31_INC -#define __CUSTOM31_INC - -[Differentiable] -public float3 c31_deform(uniform float3 xyz) { - return float3( - sin(xyz.x) * sin(xyz.z), - xyz.y, - sin(xyz.x) * sin(xyz.z) - ); -} - -public float3x3 c31_deform_jacobian(uniform float3 xyz, uniform float3 n) { - DifferentialPair dp_x = diffPair(xyz, float3(1, 0, 0)); - DifferentialPair dp_y = diffPair(xyz, float3(0, 1, 0)); - DifferentialPair dp_z = diffPair(xyz, float3(0, 0, 1)); - - DifferentialPair dp_x_out = fwd_diff(c31_deform)(dp_x); - DifferentialPair dp_y_out = fwd_diff(c31_deform)(dp_y); - DifferentialPair dp_z_out = fwd_diff(c31_deform)(dp_z); - - return float3x3(dp_x_out.d, dp_y_out.d, dp_z_out.d); -} - -#endif // __CUSTOM31_INC - -- cgit v1.2.3