ashima/gloc — Issue #7: Dissolve Interdependent Overloaded Functions Correctly
Author: dsheets
Created: 2012-03-10 03:23:17+00:00
State: open

From test/webgl/overload_interleave.in:

precision highp float;

float fst(vec2 v) { return v.x; }
float snd(vec2 v) { return v.y; }
float fst(vec3 v) { return v.x; }
float snd(vec3 v) { return v.y; }

bool is_even_dim(float) { return false; }
bool is_odd_dim(float) { return true; }
bool is_even_dim(vec2 v) { return is_odd_dim(v.x); }
bool is_odd_dim(vec2 v) { return is_even_dim(v.x); }
bool is_even_dim(vec3 v) { return is_odd_dim(v.xy); }
bool is_odd_dim(vec3 v) { return is_even_dim(v.xy); }

void main() {}