Only try swizzles on vectors, numbers, and booleans.

This commit is contained in:
Aaron Muir Hamilton
2017-10-21 19:13:42 +00:00
parent b1eaf82cc8
commit 07c0bcea92
4 changed files with 25 additions and 16 deletions

View File

@@ -1,8 +1,10 @@
#version 420
void f();
uniform sampler2D s;
void main() {
vec2 v = s.rr; // Swizzles do not apply to samplers
f().xx; // Scalar swizzle does not apply to void
f().xy; // Vector swizzle does not apply either
}