Search Issue Tracker

Fixed in future release

Votes

0

Found in

Issue ID

1083384

Regression

No

[OpenGL ES 2] HLSLcc output wrong when creating a macro for dynamic indexing a uniform and that uniform is a matrix

Shaders

-

-

Priority: 7Not yet prioritized for a release

-

Severity: 2Core functionality majorly impacted

HLSLcc produces incorrect output when creating a macro for dynamic indexing a uniform matrix array on ES2.

example:
uniform vec4 hlslcc_mtx4x4_LocalWorldToShadowAtlas[64];
...
vec4 hlslcc_mtx4x4_LocalWorldToShadowAtlasDynamicIndex(int i){
#if UNITY_DYNAMIC_INDEX_ES2
return _LocalWorldToShadowAtlas[i];
#else
#define d_ar _LocalWorldToShadowAtlas
if (i <= 0) return d_ar[0]; else if (i == 1) return d_ar[1]; else if (i == 2) return d_ar[2]; else if (i == 3) return d_ar[3]; else if (i == 4) return d_ar[4]; else if (i == 5) return d_ar[5]; else if (i == 6) return d_ar[6]; else if (i == 7) return d_ar[7]; else if (i == 8) return d_ar[8]; else if (i == 9) return d_ar[9]; else if (i == 10) return d_ar[10]; else if (i == 11) return d_ar[11]; else if (i == 12) return d_ar[12]; else if (i == 13) return d_ar[13]; else if (i == 14) return d_ar[14]; else if (i == 15) return d_ar[15]; else if (i == 16) return d_ar[16]; else if (i == 17) return d_ar[17]; else if (i == 18) return d_ar[18]; else if (i == 19) return d_ar[19]; else if (i == 20) return d_ar[20]; else if (i == 21) return d_ar[21]; else if (i == 22) return d_ar[22]; else if (i == 23) return d_ar[23]; else if (i == 24) return d_ar[24]; else if (i == 25) return d_ar[25]; else if (i == 26) return d_ar[26]; else if (i == 27) return d_ar[27]; else if (i == 28) return d_ar[28]; else if (i == 29) return d_ar[29]; else if (i == 30) return d_ar[30]; else if (i == 31) return d_ar[31]; else if (i == 32) return d_ar[32]; else if (i == 33) return d_ar[33]; else if (i == 34) return d_ar[34]; else if (i == 35) return d_ar[35]; else if (i == 36) return d_ar[36]; else if (i == 37) return d_ar[37]; else if (i == 38) return d_ar[38]; else if (i == 39) return d_ar[39]; else if (i == 40) return d_ar[40]; else if (i == 41) return d_ar[41]; else if (i == 42) return d_ar[42]; else if (i == 43) return d_ar[43]; else if (i == 44) return d_ar[44]; else if (i == 45) return d_ar[45]; else if (i == 46) return d_ar[46]; else if (i == 47) return d_ar[47]; else if (i == 48) return d_ar[48]; else if (i == 49) return d_ar[49]; else if (i == 50) return d_ar[50]; else if (i == 51) return d_ar[51]; else if (i == 52) return d_ar[52]; else if (i == 53) return d_ar[53]; else if (i == 54) return d_ar[54]; else if (i == 55) return d_ar[55]; else if (i == 56) return d_ar[56]; else if (i == 57) return d_ar[57]; else if (i == 58) return d_ar[58]; else if (i == 59) return d_ar[59]; else if (i == 60) return d_ar[60]; else if (i == 61) return d_ar[61]; else if (i == 62) return d_ar[62]; else if (i == 63) return d_ar[63];
return d_ar[0];
#undef d_ar
#endif
}

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.