Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#version 130 case statements are mishandled #82

Open
CliveMcCarthy opened this issue Jan 6, 2015 · 0 comments
Open

#version 130 case statements are mishandled #82

CliveMcCarthy opened this issue Jan 6, 2015 · 0 comments

Comments

@CliveMcCarthy
Copy link

The optimized output from a case statement is missing an 'if' and sequential assignments have commas missing.

Here is a typical output for a case:

bool tmpvar_3;
tmpvar_3 = bool(0);
bool tmpvar_4;
tmpvar_4 = bool(0);
(918 == style) tmpvar_3 = bool(1);
tmpvar_4 tmpvar_3 = bool(0);
if (tmpvar_3) {
float angle_5;
angle_5 = -(rotation_radians);
float tmpvar_6;
tmpvar_6 = cos(angle_5);
float tmpvar_7;
tmpvar_7 = sin(angle_5);
vec2 tmpvar_8;
tmpvar_8.x = tmpvar_6;
tmpvar_8.y = tmpvar_7;
vec2 tmpvar_9;
tmpvar_9.x = -(tmpvar_7);
tmpvar_9.y = tmpvar_6;
mat2 tmpvar_10;
tmpvar_10[0u] = tmpvar_8;
tmpvar_10[1u] = tmpvar_9;
vec3 tmpvar_11;
tmpvar_11.xy = (normal_2.xy * tmpvar_10);
tmpvar_11.z = normal_2.z;
vec3 tmpvar_12;
tmpvar_12 = normalize(diffuse_direction);
vec3 I_13;
I_13 = -(tmpvar_12);
color_1.xyz = (((ads_lighting.x * input_color.xyz) + (
(ads_lighting.y * max (dot (tmpvar_11, tmpvar_12), 0.0))
* input_color.xyz)) + ((ads_lighting.z *
pow (max (0.0, (I_13 - (2.0 *
(dot (tmpvar_11, I_13) * tmpvar_11)
)).z), 128.0)
) * vec3(1.0, 0.945, 0.878)));
tmpvar_4 = bool(1);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant