Skip to content

Instantly share code, notes, and snippets.

View wrightwriter's full-sized avatar
:shipit:
writing singletons

Petar Guglev wrightwriter

:shipit:
writing singletons
View GitHub Profile
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
uniform int input_tex;
uniform int jpg_result_tex;
shared vec3 shared_inputtex[8][8];
shared vec3 shared_dct_horiz[8][8];
shared vec3 shared_dct_vert[8][8];
shared vec3 shared_dct_vert_inv[8][8];
#version 420 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
#version 420 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
#version 420 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
#version 420 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
import com.krab.lazy.*;
import processing.core.PApplet
class Sketch : PApplet() {
companion object {
fun run() {
val art = Sketch()
art.runSketch()
}
}
#SingleInstance, Force
^Space::
{
if(!WinActive("ahk_exe Bitwig Studio.exe")){
return
}
MouseGetPos X, Y
void Editor::setImGuiTheme() {
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 0.95f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.12f, 0.12f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.05f, 0.94f);
colors[ImGuiCol_Border] = ImVec4(0.53f, 0.53f, 0.53f, 0.46f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
@wrightwriter
wrightwriter / houdinicheatsheet.py
Last active January 11, 2022 15:54
houdini halp
// -------------- VEX --------------
chramp()
f@Frame f@Time
i@name = value
i[]@name = array()
v@P v@Cd i@ptnum i@vtxnum i@primnum
i@numpt i@numvtx i@numprim i@numelem
@N @scale
@wrightwriter
wrightwriter / generateCalendar.js
Created February 16, 2019 12:30
Function to generate a dynamic sorted calendar object in JavaScript.
function makeCalendar(startYear, endYear) {
let calendar = {};
var dateA = new Date(startYear, 0, 1, 0, 0, 0);
var dateB = new Date(endYear, 11, 36, 0, 0, 0);
for (
var myDate = dateA;
myDate <= dateB;
myDate = new Date(myDate.getTime() + 1000 * 60 * 60 * 24)