Skip to content

Instantly share code, notes, and snippets.

@rorydriscoll
rorydriscoll / lua.sublime-build
Created February 17, 2012 18:03
Sublime Text build system for Lua
{
"cmd": ["lua", "$file"],
"file_regex": "^lua: (...*?):([0-9]*):?([0-9]*)",
"selector": "source.lua"
}
//Maya ASCII 2022 scene
//Name: Test.ma
//Last modified: Wed, Jun 23, 2021 09:24:13 AM
//Codeset: 1252
requires maya "2022";
requires "stereoCamera" "10.0";
currentUnit -l centimeter -a degree -t film;
fileInfo "application" "maya";
fileInfo "product" "Maya 2022";
fileInfo "version" "2022";
@rorydriscoll
rorydriscoll / gist:be1375a63999a272524a
Last active August 30, 2021 07:16
2D Perlin noise with derivatives
static const int permutations[256] =
{
249, 69, 172, 0, 116, 3, 219, 221,
224, 5, 6, 145, 128, 131, 97, 108,
133, 14, 165, 45, 166, 127, 114, 111,
119, 20, 34, 4, 103, 67, 48, 158,
85, 143, 181, 238, 217, 173, 78, 139,
179, 77, 191, 89, 251, 150, 183, 8,
168, 225, 23, 65, 55, 247, 136, 104,
117, 193, 174, 106, 122, 199, 243, 211,
@rorydriscoll
rorydriscoll / FullScreenQuad.hlsl
Created December 19, 2011 05:52
A vertex shader that uses the vertex ID to generate a full-screen quad. Don't bind vertex buffer, index buffer or input layout. Just render three vertices!
struct Output
{
float4 position_cs : SV_POSITION;
float2 texcoord : TEXCOORD;
};
Output main(uint id: SV_VertexID)
{
Output output;