Skip to content

Instantly share code, notes, and snippets.

@mgdevereux
mgdevereux / GLSL-Noise.md
Created January 25, 2024 18:43 — forked from patriciogonzalezvivo/GLSL-Noise.md
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);
I am attesting that this GitHub handle mgdevereux is linked to the Tezos account tz1azhk3rPW4ZjST4oW2BdGLQbgcASdAvN3e for tzprofiles
sig:edsigttmzsrCE3nf2mEyqfuWkCA2mfKpUsCrEra3U7AijN54PshanFtdYb43qGd9NPDE3VqCZssrJv9tMiHdJPwzsCtUUK7maQv
@mgdevereux
mgdevereux / OpenSimplexNoise.java
Created March 30, 2022 00:33 — forked from KdotJPG/OpenSimplex2S.java
Visually isotropic coherent noise algorithm based on the simplectic honeycomb.
/*
* 2014 OpenSimplex Noise in Java.
* by Kurt Spencer
*
* Updated Dec 2019 and Feb 2020:
* - New lattice-symmetric gradient sets
* - Optional alternate lattice orientation evaluators
*
* This implementation has been updated to slightly improve its output, but it is recommented to first
* try the newer OpenSimplex2S or OpenSimplex2F noise. These are located in the OpenSimplex2 repo:
@mgdevereux
mgdevereux / OpenSimplexNoise.cs
Created March 30, 2022 00:16 — forked from digitalshadow/OpenSimplexNoise.cs
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@mgdevereux
mgdevereux / contrast_s.m
Created March 29, 2022 23:46 — forked from OrganicIrradiation/contrast_s.m
2D and 3D Perlin Noise in MATLAB
s = (cos(s * pi - pi) + 1) / 2;
@mgdevereux
mgdevereux / min-char-rnn.py
Created March 29, 2022 18:55 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mgdevereux
mgdevereux / tumblr-likes-downloader.rb
Created March 30, 2016 23:14 — forked from joshwand/tumblr-likes-downloader.rb
download your liked photos from tumblr
require 'tumblr_client'
require 'mechanize'
require 'date'
require 'yaml'
require 'uri'
Tumblr.configure do |config|
config.consumer_key = "consumer_key"
config.consumer_secret = "consumer_secret"
config.oauth_token = "oath_token"