All Projects → dmnsgn → glsl-rotate

dmnsgn / glsl-rotate

Licence: MIT License
GLSL rotation functions with matrices: 2D and 3D (with X/Y/Z convenience functions).

Programming Languages

GLSL
2045 projects

Projects that are alternatives of or similar to glsl-rotate

PyGLM
Fast OpenGL Mathematics (GLM) for Python
Stars: ✭ 167 (+209.26%)
Mutual labels:  matrix, glsl
Godot 3 2d Crt Shader
A 2D shader for Godot 3 simulating a CRT
Stars: ✭ 183 (+238.89%)
Mutual labels:  glsl, 2d
Gl Water2d
2D liquid simulation in WebGL
Stars: ✭ 260 (+381.48%)
Mutual labels:  glsl, 2d
sdf-2d
A graphics library to enable the real-time rendering of 2D signed distance fields on the web.
Stars: ✭ 70 (+29.63%)
Mutual labels:  glsl, 2d
Alchemy
CV DL
Stars: ✭ 59 (+9.26%)
Mutual labels:  matrix
Tiny-OpenGL-Shadow-Mapping-Examples
Compact OpenGL Shadow Mapping Examples in a single compilation unit
Stars: ✭ 21 (-61.11%)
Mutual labels:  glsl
PhaserCHOP-TD-Summit-Talk
Project files associated with http://github.com/dbraun/PhaserCHOP and David Braun's "Quantitative Easing" talk at the 2019 TouchDesigner Summit https://www.youtube.com/watch?v=S4PQW4f34c8
Stars: ✭ 36 (-33.33%)
Mutual labels:  glsl
Scylla
An Elm-based front-end for Matrix.
Stars: ✭ 24 (-55.56%)
Mutual labels:  matrix
awesome-glsl
🎇 Compilation of the best resources to learn programming OpenGL Shaders
Stars: ✭ 700 (+1196.3%)
Mutual labels:  glsl
matrix-puppet-facebook
a puppetted facebook bridge
Stars: ✭ 90 (+66.67%)
Mutual labels:  matrix
WebGL-Distance-Fields
⭐ Realtime Euclidean distance field generation and rendering
Stars: ✭ 50 (-7.41%)
Mutual labels:  glsl
mxpp
Bot for bridging Matrix and XMPP
Stars: ✭ 23 (-57.41%)
Mutual labels:  matrix
alvito
Alvito - An Algorithm Visualization Tool for Python
Stars: ✭ 52 (-3.7%)
Mutual labels:  matrix
Fyrox
3D and 2D game engine written in Rust
Stars: ✭ 3,539 (+6453.7%)
Mutual labels:  2d
ElectricSheep WebGL
WebGL Electric Sheep Renderer
Stars: ✭ 14 (-74.07%)
Mutual labels:  glsl
webvs
Audio Visualization rendering library for the browser
Stars: ✭ 87 (+61.11%)
Mutual labels:  glsl
MiniKnight
A pixel-art platformer in F#, where you must fight your way to the portal, collecting coins and slaying orcs along the way!
Stars: ✭ 47 (-12.96%)
Mutual labels:  2d
cage
Cage (Ain't a Game Engine) - write 2D games using plain C
Stars: ✭ 40 (-25.93%)
Mutual labels:  2d
voltar
WebGL only 2D game engine using Godot as the visual editor
Stars: ✭ 25 (-53.7%)
Mutual labels:  2d
monolish
monolish: MONOlithic LInear equation Solvers for Highly-parallel architecture
Stars: ✭ 166 (+207.41%)
Mutual labels:  matrix

glsl-rotate frozen

GLSL rotation functions with matrices: 2D and 3D (with X/Y/Z convenience functions).

Installation

npm install glsl-rotate

NPM

Usage

#pragma glslify: rotate = require(glsl-rotate)
#pragma glslify: rotateX = require(glsl-rotate/rotateX)
#pragma glslify: rotateY = require(glsl-rotate/rotateY)
#pragma glslify: rotateZ = require(glsl-rotate/rotateZ)

const float HALF_PI = 1.570796327;

void main() {
	vec2 p2d = vec2(1.0, 0.0);
	vec3 p3d = vec3(1.0, 0.0, 0.0);

	// 2d rotation
	p2d = rotate(p2d, HALF_PI);

	// 3d rotation
	// arbitrary axis
	vec3 axis = vec3(1.0, 0.0, 0.0);
	vec3 p3dA = rotate(p3d, axis, HALF_PI);

	// X/Y/Z axis
	vec3 p3dX = rotateX(p3d, HALF_PI);
	vec3 p3dY = rotateY(p3d, HALF_PI);
	vec3 p3dZ = rotateZ(p3d, HALF_PI);
}

License

MIT. See license file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].