summaryrefslogtreecommitdiffstats
path: root/test.slang
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-10-11 13:04:57 -0700
committeryum <yum.food.vr@gmail.com>2025-10-11 13:04:57 -0700
commitd1ecda540ddd6e9ab53f7981de65c3e435c1132c (patch)
tree6907da6e0d4df248ce19ea825eccdf261f28ae9c /test.slang
parent06780e36b2aeb1257607c89570fd99903508b82e (diff)
more stuff
Diffstat (limited to 'test.slang')
-rw-r--r--test.slang26
1 files changed, 0 insertions, 26 deletions
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<float3> dp_x = diffPair(xyz, float3(1, 0, 0));
- DifferentialPair<float3> dp_y = diffPair(xyz, float3(0, 1, 0));
- DifferentialPair<float3> dp_z = diffPair(xyz, float3(0, 0, 1));
-
- DifferentialPair<float3> dp_x_out = fwd_diff(c31_deform)(dp_x);
- DifferentialPair<float3> dp_y_out = fwd_diff(c31_deform)(dp_y);
- DifferentialPair<float3> 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
-