Skip to content

Instantly share code, notes, and snippets.

View 0b5vr's full-sized avatar

0b5vr 0b5vr

View GitHub Profile
@0b5vr
0b5vr / wav.pde
Created June 7, 2015 03:54
Processing wav generator
final int SIZE = 44100;
final int RATE = 44100;
byte[] file = new byte[ 44+SIZE*4 ];
float wave( float _time, float _right ){
return sin( _time * PI * 2.0 * 440.0 );
}
void setup(){
// "RIFF"
@0b5vr
0b5vr / Scaler.cs
Created July 7, 2015 10:03
20150707_BSoD_Workshop_scaler
using UnityEngine;
using System.Collections;
public class Scaler : MonoBehaviour {
// Use this for initialization
void Start () {
}
@0b5vr
0b5vr / shader.frag
Last active August 29, 2015 14:26
glsl glitch experiment ( will not works in better gpu )
#ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 resolution;
#define saturate(i) clamp(i,0.,1.)
mat2 rotate( float _t ){
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@0b5vr
0b5vr / gist:53a801156a84764b788c3ac0b0867c0c
Created March 11, 2017 17:24
Thump: Cat and Katakana with pixel sorter
#l 2 8 img/msgothic_16x16pn.png
#l 2 13 img/cat_big.png
#l 1 12 img/cat_small.png
@start
pi $_, si 0, rns $_
// pi $_, si 11, zi 4, cp $_
// pi $_, si 8, gzr $_
@loopB
@0b5vr
0b5vr / gist:4a3773e7460f32ecc30529d4610b6779
Last active March 13, 2017 16:12
Thump: JPG Deformer
#l 2 15 img/cat_small.png
pi $0, si 0
pi $1, si 1
pi $2, si 2
pi $3, si 3
pi $4, si 4
pi $8, si 8
pi $9, si 9
pi $32, si 32
pi $0, si 0
pi $1, si 1
pi $2, si 2
pi $4, si 4
pi $8, si 8
pi $32, si 32
pi $64, si 64
pi $96, si 96
pi $128, si 128
#l 1 8 0
#l 1 9 img/msgothic_16x16p.png
pi $0, si 0
pi $1, si 1
pi $2, si 2
pi $4, si 4
pi $8, si 8
pi $9, si 9
pi $16, si 16
#l 1 8 0
#l 1 9 img/msgothic_16x16p.png
pi $0, si 0
pi $1, si 1
pi $2, si 2
pi $4, si 4
pi $8, si 8
pi $9, si 9
pi $16, si 16
#l 1 8 0
#l 1 9 img/msgothic_16x16p.png
pi $0, si 0
pi $1, si 1
pi $2, si 2
pi $4, si 4
pi $8, si 8
pi $9, si 9
pi $16, si 16