Skip to content

Instantly share code, notes, and snippets.

View lcrs's full-sized avatar
🍅

lwws lcrs

🍅
View GitHub Profile
#ifdef GL_ES
precision mediump float;
#endif
uniform float adsk_time;
uniform float adsk_result_w, adsk_result_h;
uniform float Rotation;
uniform float pLeft;
uniform bool vignette;
@lcrs
lcrs / crok_folding_loop.glsl
Created January 8, 2014 22:29
folding noise matchbox shader with loop duration control
uniform float adsk_time;
uniform float adsk_result_w, adsk_result_h;
uniform float pRight;
uniform float pLeft;
uniform float Offset;
uniform float Speed;
uniform float Zoom;
uniform float Detail;
uniform float Steps;
uniform float Aspect;
<!-- filthy matchbox prototyping environment -->
<!-- [email protected] -->
<canvas id="canvas" width="640" height="360"></canvas>
<textarea id="txt" style="width:640px; height:360px;">
uniform float adsk_result_w, adsk_result_h;
uniform float adsk_time;
uniform float amount;
uniform vec2 position;
uniform vec3 colour;
uniform int number;
@lcrs
lcrs / K_Blur_v5.glsl
Last active August 29, 2015 13:57
working v5
uniform sampler2D image;
uniform float radius;
uniform float adsk_result_w, adsk_result_h;
uniform vec4 work;
vec2 iResolution = vec2(adsk_result_w, adsk_result_h);
vec2 uv=(gl_FragCoord.xy/iResolution.xy);
vec2 vTexCoord = uv;
float blurSize = radius/iResolution.x;
import numpy as np, matplotlib.pyplot as pp, mpl_toolkits.mplot3d as mp
import scipy.interpolate as si, scipy.optimize as so, scipy.spatial.distance as ssd, scipy.integrate
data = (1,2,3,4,5,6,7,8),(1,2.5,4,5.5,6.5,8.5,10,12.5),(1,2.5,4.5,6.5,8,8.5,10,12.5)
p = 6.5,9.5,9
# Fit a spline to the data - s is the amount of smoothing, tck is the parameters of the resulting spline
(tck, uu) = si.splprep(data, s=0)
# Return distance from 3d point p to a point on the spline at spline parameter u
// frameguide
// Shader written by: Kyle Obley ([email protected]), Miles Essmiller & Ivar Beer
uniform sampler2D Source;
uniform float adsk_result_w, adsk_result_h, adsk_Source_frameratio, adsk_time;
uniform float ratio, let_blend, guide_blend, center_blend, size;
vec2 resolution = vec2(adsk_result_w, adsk_result_h);
float iGlobalTime = adsk_time;
@lcrs
lcrs / noiz.glsl
Created November 9, 2014 17:31
Time varying 1D simplex noise with frequency and bias controls
// Using Ashima's simplex noise
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
vec3 mod289(vec3 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
vec2 mod289(vec2 x) {
@lcrs
lcrs / glasso.glsl
Created November 24, 2014 19:18
glasso
uniform float adsk_time;
uniform float adsk_result_w, adsk_result_h;
uniform sampler2D front, matte;
float get(vec2 p) {
return texture2D(matte, p).r;
}
void main(void)
{
@lcrs
lcrs / crok_cam_shaker.glsl
Created December 10, 2014 21:31
crok cam shaker moblur test
uniform sampler2D source;
uniform float adsk_time, zoom, offset, adsk_result_frameratio, rotation;
uniform float Speed, pos_frq, pos_amp_x, pos_amp_y, zoom_amp, zoom_frq, rot_frq, rot_amp;
uniform float adsk_result_w, adsk_result_h;
vec2 resolution = vec2(adsk_result_w, adsk_result_h);
uniform vec2 center;
uniform bool enbl_zoom, enbl_position, enbl_rotation;
@lcrs
lcrs / crok_snow3d.glsl
Last active October 26, 2015 12:41
Snow rotate-o
// based on https://www.shadertoy.com/view/4tSSzt by FabriceNeyret2
// using the base ray-marcher of Trisomie21: https://www.shadertoy.com/view/4tfGRB#
vec3 adsk_getVertexPosition();
vec3 adsk_getCameraPosition();
vec3 adsk_getLightPosition();
vec3 adsk_getLightDirection();
vec3 adsk_getLightTangent();
vec3 adsk_getLightColour();
vec3 adsk_getDiffuseMapCoord();