Skip to content

Instantly share code, notes, and snippets.

//rotate 2d vector
vec2 rotateUV(vec2 uv, float angle)
{
float rad = angle*(3.14159265359/180.0);
float c = cos(rad);
float s = sin(rad);
return vec2( uv.x * c - uv.y * s, uv.x * s + uv.y * c);
}
//get a triplanar interpolated texture look up
@ghidra
ghidra / SimpleQuad.glsl
Created November 3, 2016 16:46
Urho3d simple quad example
#include "Uniforms.glsl"
#include "Samplers.glsl"
#include "Transform.glsl"
#include "ScreenPos.glsl"
//varying vec2 vTexCoord;
varying vec2 vScreenPos2;
void VS()
{