diff options
| author | yum <yum.food.vr@gmail.com> | 2025-10-12 16:28:53 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-10-12 16:28:53 -0700 |
| commit | a4bf31470f7e2855f13d922e3e7ad1c7767d9afd (patch) | |
| tree | eeefe31633142978c609c2dd2b4d6890349526a6 /custom31.slang | |
| parent | 6ac3da1b0bd363d70c2f6e4b7b921f2f929dedac (diff) | |
add geometry shader
Diffstat (limited to 'custom31.slang')
| -rw-r--r-- | custom31.slang | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/custom31.slang b/custom31.slang index 61afe4a..441daeb 100644 --- a/custom31.slang +++ b/custom31.slang @@ -62,34 +62,6 @@ float3x3 inverse(float3x3 m, float det) { return inv; } -[Differentiable] -public float3 c31_deform(float3 xyz, no_diff float A, no_diff float k, no_diff float t) { - float x = xyz.x; - float y = xyz.y; - float z = xyz.z; - - float x0 = x + sin(y * k) * 0.1; - float y0 = y + sin(x * k * 2) * 0.5 + cos(z); - float z0 = (z + sin(x * y * k * PI + t) * A) * (1.0 + sin(y * k) * sin(x * k)); - - x0 += z0 * 0.1 * sin(z0 * PI + 1.5); - y0 += z0 * 0.1 * sin(z0 * PI + 1.5); - - x0 -= 0.0; - y0 -= 1.2; - - return float3( - x0, y0, z0 - ); -} - - -// Deform a normal vector using the inverse transpose of the jacobian. -public void c31_deform_normal(float3 xyz, inout float3 normal, - inout float3 tangent, float A, float k, float t) { - R3R3_NORMALS(normal, tangent, c31_deform, A, k, t); -} - // Takes map a 2x2 quad on the xy plane to a tube. The circular cross section // is on the xz plane. [Differentiable] |
