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;
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;