Skip to content

Instantly share code, notes, and snippets.

View Interfiber's full-sized avatar
🔨
Working

Interfiber Interfiber

🔨
Working
View GitHub Profile
@Interfiber
Interfiber / lua_yum.sh
Last active April 25, 2021 14:56
Lua Yum: A Quick start script to get you rolling with lua
echo "Copyright Interfiber 2020-2021"
echo "Lua quickstart script."
echo "This script will download, and compile lua from source"
echo "Lua is very lightweight so this should not take that long"
echo ""
echo ""
echo ""
echo "stage: downloading lua..."
curl -#L https://www.lua.org/ftp/lua-5.4.2.tar.gz -o LUA_STAGE_DOWNLOAD.tar.gz
if ! test -f LUA_STAGE_DOWNLOAD.tar.gz; then
@mattatz
mattatz / Matrix.hlsl
Last active November 2, 2024 14:10
Matrix operations for HLSL
#ifndef __MATRIX_INCLUDED__
#define __MATRIX_INCLUDED__
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
float4x4 inverse(float4x4 m) {
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0];
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1];
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2];
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3];