Skip to content

Instantly share code, notes, and snippets.

View somecho's full-sized avatar

Somē Cho somecho

View GitHub Profile
@jlesquembre
jlesquembre / shell.nix
Created August 26, 2020 08:57
Neovim + conjure shell.nix
# Usage:
# nix-shell --command nvim
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/b9ba82ef8ad6d8997840332ca3a2986e360291e3.tar.gz") { } }:
let
myNeovim = pkgs.neovim.override {
configure = {
customRC = ''
" here your custom configuration goes!
set termguicolors
@joelittlejohn
joelittlejohn / test.clj
Last active July 3, 2023 21:08
Dynamically generate clojure.test deftests (and other tricks)
(ns dynamic.test
(:require [clojure.test :refer :all]))
;; This example shows how tests can be generated dynamically, by
;; creating new vars with the correct metadata.
(defn add-test
"Add a test to the given namespace. The body of the test is given as
the thunk test-fn. Useful for adding dynamically generated deftests."
[name ns test-fn & [metadata]]
@mattatz
mattatz / LabColorspace.cginc
Created November 25, 2015 05:35
Conversion between RGB and LAB colorspace shader for Unity.
#ifndef __LAB_COLORSPACE__
#define __LAB_COLORSPACE__
/*
* Conversion between RGB and LAB colorspace.
* Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138
*/
float3 rgb2xyz( float3 c ) {
float3 tmp;
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 13, 2024 08:38
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);