Skip to content

Instantly share code, notes, and snippets.

@stephent
stephent / eulerRotation.c
Created March 16, 2023 03:24 — forked from sketchpunk/eulerRotation.c
Apply Euler Rotation on position & normals in GLSL
/*
vec3 rot = vec3( 90.0, 90.0, 0.0 );
vec3 pos = position * scale;
vec3 norm = normal;
eulerRotation( rot * DEG2RAD, pos, norm );
*/
const float DEG2RAD = 0.01745329251; // PI / 180
// Apply YXZ radian rotation