Sha256: f35e09ede4ccd843d7cf1070011d3241724e012ba09aab6b94b870b5b6dd805d
Contents?: true
Size: 734 Bytes
Versions: 13
Compression:
Stored size: 734 Bytes
Contents
#version 330 uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform float rotation; uniform vec2 scale; uniform vec2 uvOffset; uniform vec2 uvScale; in vec2 position; in vec2 uv; out vec2 vUV; void main() { vUV = uvOffset + uv * uvScale; vec2 alignedPosition = position * scale; vec2 rotatedPosition; rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; vec4 finalPosition; finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); finalPosition.xy += rotatedPosition; finalPosition = projectionMatrix * finalPosition; gl_Position = finalPosition; }
Version data entries
13 entries across 13 versions & 2 rubygems