Skip to content

Instantly share code, notes, and snippets.

#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything
#define iTime fGlobalTime
vec2 rotate(vec2 a, float b)
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
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 texChecker;
uniform sampler2D texNoise;
I
II
III
IV -> II
V -> I
VI -> II
VII -> III
VIII -> IV -> II
IX -> II
X -> I
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
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 texChecker;
uniform sampler2D texNoise;
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
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 texChecker;
uniform sampler2D texNoise;
'🔴' U+1F534 Large Red Circle
'😡' U+1F621 Pouting Face
'🤗' U+1F917 Hugging Face
'🌕' U+1F315 Full Moon Symbol
'🎾' U+1F3BE Tennis Racquet and Ball
'🤢' U+1F922 Nauseated Face
'🌎' U+1F30E Earth Globe Americas
'🔵' U+1F535 Large Blue Circle
'😈' U+1F608 Smiling Face with Horns
'🍇' U+1F347 Grapes
@lunasorcery
lunasorcery / im-gay.txt
Created May 20, 2018 16:42
Compressed sprite data for the I'M GAY gba_bios.bin mod.
24 40 03 00 0F 00 40 01 01 00 01 42 42 43 43 C4
44 05 C4 04 C4 0F C4 02 0A 03 C3 01 0E 0C 08 0D
07 09 06 0B AA AB 48 75 EB B8 9C AA 0F FD 85 FA
4F 57 17 E9 79 E7 49 7C 5F 67 FD 47 FE 9C EE 24
FD ED 5F 46 94 57 7C 66 49 0B 40 84 0F AB 2B FA
57 67 24 DC A1 9F EC FF 2A 3E 54 F1 AD AB 52 C5
BE F2 75 91 82 81 2B D6 D6 8B 80 65 76 F2 3F EC
61 FF 1F 75 59 59 75 FC A2 24 D7 D6 0A 65 3C 11
E3 B3 66 A4 F9 5F 8E FF F9 BA FA 7F 10 A7 92 73
6E 39 4C 21 7F 9C 7F C4 FF AD FC B8 33 AE EE E2
#include <Arduboy2.h>
Arduboy2 arduboy;
static const unsigned char data[] PROGMEM = {
0x40,
0x48,
0x50,
0x58,
0x60,
@lunasorcery
lunasorcery / Array2D.cs
Created June 11, 2016 13:43
Sane multi-dimensional arrays in C#
using System;
namespace ArrayND
{
public class Array2D<T>
{
private int m_width;
private int m_height;
private T[] m_data;
@lunasorcery
lunasorcery / crc_zeroing.cpp
Created September 7, 2015 16:31
A demonstration of how a custom-crafted CRC table can force a hash of zero.
#include <cstdint>
#include <cstdio>
#define MAX_DATA_SIZE 256
#define USE_MODIFIED_CRC_TAB 0
static uint32_t crc32_tab[] = {
#if !USE_MODIFIED_CRC_TAB
// this is the classic "default" CRC32 table.
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,