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

Assigning values to xll_matrixindex_mf3x3_i() #55

Open
l0ne5tar opened this issue Sep 19, 2014 · 0 comments
Open

Assigning values to xll_matrixindex_mf3x3_i() #55

l0ne5tar opened this issue Sep 19, 2014 · 0 comments

Comments

@l0ne5tar
Copy link

Hi,

I'm seeing some weird code being generated where hlsl2glsl is attempting to assign a value to a function return:
xll_matrixindex_mf3x3_i (TangentToWorld, 0) = test;

xll_matrixindex_mf3x3_i is implemented at the top of the generated GLSL as:

vec3 xll_matrixindex_mf3x3_i (mat3 m, int i) { vec3 v; v.x=m[0][i]; v.y=m[1][i]; v.z=m[2][i]; return v; }

so in my case the assignment is a nop :(

for reference my hlsl code fragment is:
float3 test = a_Tangent;
float3x3 TangentToWorld = float3x3(WorldTangent, WorldBinormal, WorldNormal);
TangentToWorld[0] = test;

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