Skip to content

Instantly share code, notes, and snippets.

View yutannihilation's full-sized avatar
🍣
Nobody loves you

Hiroaki Yutani yutannihilation

🍣
Nobody loves you
View GitHub Profile
@munrocket
munrocket / wgsl_3d_sdf.md
Last active March 7, 2024 17:25
WGSL 3D SDF Primitives

WGSL 3D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/407

Sphere - exact

fn sdSphere(p: vec3f, r: f32) -> f32 {
  return length(p) - r;
}
# .External2 is needed because the 'op' and 'args'
# SEXPs are what need to be passed to GErecordGraphicOperation()
test_point <- function() {
.External2(getNativeSymbolInfo("C_testPoint", "wk"))
}
# Needed for Rcpp to pick up on "C_testPoint"
test_point2 <- function() {
.Call("C_testPoint")
@TomWhitwell
TomWhitwell / clouds.cc
Last active December 19, 2021 06:27
"Hello World' for Mutable Instruments Clouds module
// Copyright 2014 Olivier Gillet.
//
// Author: Olivier Gillet (ol.gillet@gmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: