Skip to content

Instantly share code, notes, and snippets.

@1ibrium
1ibrium / Quaternion.hlsl
Created October 14, 2019 09:15 — forked from mattatz/Quaternion.hlsl
Quaternion structure for HLSL
#ifndef __QUATERNION_INCLUDED__
#define __QUATERNION_INCLUDED__
#define QUATERNION_IDENTITY float4(0, 0, 0, 1)
#ifndef PI
#define PI 3.14159265359f
#endif
// Quaternion multiplication