Skip to content

Instantly share code, notes, and snippets.

View 0xF6's full-sized avatar
🧬

Yuuki Wesp 0xF6

🧬
View GitHub Profile
@RemyUnity
RemyUnity / CubemapTextureBuilder.cs
Created April 9, 2020 09:03
Unity utility to convert 6 texture to a single cubemap texture
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Linq;
using System.IO;
public class CubemapTextureBuilder : EditorWindow
{
[MenuItem("Tools/Cubemap Builder")]
@mattatz
mattatz / Matrix.hlsl
Last active April 3, 2024 01:37
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];