Skip to content

Instantly share code, notes, and snippets.

View CharStiles's full-sized avatar

Char CharStiles

View GitHub Profile
Shader "GlitchRayMarchingNoise" {
Properties {
_Size ("Size", Vector) = (1,1,1,1)
_Height ("Height", Float) = 1
_Rotate ("Rotate", Vector) = (0,0,0,0)
[Header(GBuffer)]
_MainTex ("Albedo Map", 2D) = "white" {}
// _NoiseTex("Noise Texture", 2D) = "white" {}
from sys import argv
import os
import math
def dist(x1,y1,x2,y2):
dist = math.sqrt((x2 - x1)**2 + (y2 - y1)**2)
return dist
def notLight(li):
'''
based off of test.py from https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
Thanks to Aman Tiwari for the help.
to run:
python ServerToProcessFaceSketch.py --dataroot ./darta --name face_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction AtoB --dataset_mode aligned --norm batch
'''
import os
import io
import time
import zmq
#! /usr/bin/python
import zmq
import numpy as np
from PIL import Image
import os
port = "8080"
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://IP:%s" % port)
# my fork of https://gist.github.com/SlexAxton/4989674
gifify() {
if [[ -n "$1" ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
if [[ $2 == '--small' ]]; then
a=$(ls out-static* | wc -l)
for p in $(ls -r out-static*);
do
out=$(printf "out-static-%05d.png" $a)
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D texture0;
uniform sampler2D texture1;
uniform sampler2D texture2;
#version 150
//Char Stiles 2018
// you can see what this renders to here: https://www.youtube.com/watch?v=gfJXa_MILdk&feature=youtu.be
// to run this code yourself download OSX Kodelife from Hexler.
// then create variables in the side panel for noise1 (sampler2D of noise), ans value1 (float)
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D texture0;
uniform sampler2D shared1;
uniform sampler2D texture2;
var tree
var pad = 10
class Node{
constructor(v){ // v is a string
this.val = v;
}
}
class Tree{
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D texture0;
uniform sampler2D texture1;
uniform sampler2D texture2;
uniform sampler2D texture3;