Skip to content

Instantly share code, notes, and snippets.

@texone
texone / PoissonFill.java
Created January 2, 2023 18:33 — forked from LingDong-/PoissonFill.java
Poisson Filling Shader for Processing(Java)
/* Poisson Filling for Processing
* Made possible with support from The Frank-Ratchye STUDIO For Creative Inquiry
* At Carnegie Mellon University. http://studioforcreativeinquiry.org/
*/
package poissonfill;
import processing.core.*;
import processing.opengl.*;
import java.util.*;
@texone
texone / gist:66a46554a6fbda50ccc9831561e4037f
Created June 19, 2020 06:58 — forked from DuncanF/gist:353509dd397ea5f292fa52d1b9b5133d
Unity lockless (no GPU readback) marching cubes via Graphics.DrawProceduralIndirect - some slight faffing because compute shader must append full triangle (3 verts) at a time to render correctly, but this means the appendbuffer count is 3 times smaller than it needs to be, so we have to invoke a very short compute shader (FixupIndirectArgs) just…
MarchingCubesGPU.cs:
...
// DrawProceduralIndirect
ComputeBuffer argsBuffer;
[StructLayout(LayoutKind.Sequential)]
struct DrawCallArgBuffer
{
public const int size =
sizeof(int) +
sizeof(int) +
@texone
texone / grasshopper csharp only
Created January 16, 2020 22:45
mesh based reaction diffusion
using System;
using System.Collections;
using System.Collections.Generic;
using Rhino;
using Rhino.Geometry;
using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;