skln

GLSL Switch() Bug?

Discussion created by skln on Jul 23, 2014

Well I've tried this on at least 2 AMD GPUs and get the same error so:

 

When using a component of a vector in a switch statement, AMD's glsl compiler complains about it being nonscalar. It works fine on Nvidia cards though.

 

[code]

ivec4 value;

 

switch( value.x ) // error nonscalar value, adding a int() cast is a temporary fix at least.

{

}

[/code]

 

Not that big of a bug but still...

Outcomes