Skip to content

Instantly share code, notes, and snippets.

View mosure's full-sized avatar
👾

mitchell mosure mosure

👾
View GitHub Profile
@motss
motss / simple-loading-screen.html
Last active May 4, 2026 01:47
simple loading screen
<!-- Credits to http://codepen.io/mikeambrosi/pen/JdEMmY -->
<html>
<head>
<style>
/* Run on https://autoprefixer.github.io/ to compile CSS */
.loading {
position: absolute;
top: 50%;
left: 50%;
margin: -15px 0 0 -15px;
@bkaradzic
bkaradzic / orthodoxc++.md
Last active May 16, 2026 11:21
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@983
983 / frag.glsl
Created November 14, 2015 09:39
hsv rgb conversion glsl shader
// because http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl is often down
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 5, 2026 12:05
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);