Skip to content

Instantly share code, notes, and snippets.

View soma-arc's full-sized avatar

soma soma-arc

View GitHub Profile
import bpy
from bpy.types import Panel, EnumProperty, WindowManager
import bpy.utils.previews
import os
# UI
class PreviewsExamplePanel(bpy.types.Panel):
bl_label = "Previews Example Panel"
bl_idname = "OBJECT_PT_previews"
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 7, 2025 15:41
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);
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-color.md
Last active August 29, 2022 15:54
GLSL color functions

RGB - YUB

mat3 yuv2rgb = mat3(1.0, 0.0, 1.28033, 1.0, -0.21482, -0.38059, 1.0, 2.12798, 0.0);
mat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);

RGB - HSV