This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to generate a random hex color | |
generate_random_color() { | |
printf "%06x\n" $((RANDOM%16777215)) | |
} | |
# Set the desktop directory | |
desktop_dir="$HOME/Desktop" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform float u_time; | |
uniform float u_vol; | |
// i copied and pasted these functions from the sticker sheet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform float u_time; | |
uniform float u_vol; | |
// http://www.iquilezles.org/www/articles/palettes/palettes.htm | |
// to see this function graphed out go to: https://www.desmos.com/calculator/rz7abjujdj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform float u_time; | |
uniform float u_vol; | |
void main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.iquilezles.org/www/articles/palettes/palettes.htm | |
// to see this function graphed out go to: https://www.desmos.com/calculator/18rq4ybrru | |
vec3 cosPalette( float t , vec3 brightness, vec3 contrast, vec3 osc, vec3 phase) | |
{ | |
return brightness + contrast*cos( 6.28318*(osc*t+phase) ); | |
} | |
// Repeat around the origin by a fixed angle. | |
// For easier use, num of repetitions is use to specify the angle. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.iquilezles.org/www/articles/palettes/palettes.htm | |
// to see this function graphed out go to: https://www.desmos.com/calculator/rz7abjujdj | |
vec3 cosPalette( float t , vec3 brightness, vec3 contrast, vec3 osc, vec3 phase) | |
{ | |
return brightness + contrast*cos( 6.28318*(osc*t+phase) ); | |
} | |
void main() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform float u_time; | |
uniform float u_vol; | |
#define PI 3.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uniform sampler2D midi; | |
vec2 midiCoord(float offset) | |
{ | |
float x = mod(offset,32.); | |
float y = offset / 32.; | |
return vec2(x,y)/32.; | |
} | |
float getMidi(float number){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tips for converting GLSL functions to Unity functions | |
// vec turn into float (usually massive comand all replace works) | |
// fract -> frac | |
// mod -> modf | |
// time, iTime, u_Time -> _Time.y | |
float3 hsv2rgb(float3 c) { | |
c = float3(c.x, clamp(c.yz, 0.0, 1.0)); | |
float4 K = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/swirl" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
} | |
SubShader |
NewerOlder