#### View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|

0026305 | Runner | Functions | Public | 2017-04-25 11:41 | 2018-10-29 09:47 |

Reporter | Stewart Bishop | Assigned To | Antanas Budvytis | ||

Priority | Low | Severity | C - General | Reproducibility | 100% |

Status | Closed | Resolution | Fixed | ||

Platform | HTML5 | OS | OS Version | ||

Product Version | Pre-2.1.3 | ||||

Target Version | 2.2.1 | Fixed in Version | 2.2.1 | ||

Summary | 0026305: HTML5: Matrices (other than matrix_world) returned from "matrix_get" are wrong unless set with "matrix_set" | ||||

Description | In testing 3D, I have found that the matrix_get functions seem to be broken on HTML5 - seemingly for both 2D and 3D. Observing the results of the sample below, the problems with HTML5 are quite prelevant when compared to the Windows target. matrix_world seems to be completely correct in HTML5. The first obvious concern is that the matrices do not seem to change between 2D and 3D projections in HTML5 - it treats it as though the 3D view was never established, even though it clearly has a visual effect. This could be a bug with the d3d_set_projection[_*] not updating the internal matrices correctly. The second is that the projection and view matrices seem to have swapped "slots" - "view" in HTML5 seems to match "projection" on Windows, and "projection" in HTML5 seems to match "view" on Windows, which causes problems with multiplying matrices in general. "matrix_set" seems to work correctly - it updates the appropriate slots (matrix_set(matrix, matrix_projection) does result in the output Projection matrix being the same as "matrix", meaning the retrieval works as expected) - on top of this, the matrices set do not change after the projection call. These tests seem to suggest that the problem lies with projection setting - the automatic views set the (accessible, since rendering seems correct) projection and view matrices the wrong way around, and none of the d3d_set_projection[_*] functions update them at all. To clarify, these problems only seem to occur in the HTML5 export. Sample table of printouts (For quick reference): Windows target: Print custom Matrix (set to world [0.73, 0.46, -0.84, 12, ] [-0.15, 1.80, 0.86, 32, ] [2.37, -0.62, 1.72, 54, ] [0, 0, 0, 1, ] Print 2D projection Matrices World [0.73, 0.46, -0.84, 12, ] [-0.15, 1.80, 0.86, 32, ] [2.37, -0.62, 1.72, 54, ] [0, 0, 0, 1, ] View [1, 0, 0, -512, ] [0, 1, 0, -160, ] [0, 0, 1, 16000, ] [0, 0, 0, 1, ] Projection [0.00, 0, 0, -0.00, ] [0, -0.01, 0, 0.00, ] [0, 0, 0.00, -0.00, ] [0, 0, 0, 1, ] Print 3D projection Matrices World [0.73, 0.46, -0.84, 12, ] [-0.15, 1.80, 0.86, 32, ] [2.37, -0.62, 1.72, 54, ] [0, 0, 0, 1, ] View [1, 0, 0, 0, ] [0, -0.45, 0.89, 0, ] [0, -0.89, -0.45, 143.11, ] [0, 0, 0, 1, ] Projection [0.49, 0, 0, -0.00, ] [0, 1.57, 0, 0.00, ] [0, 0, 1.00, -1.00, ] [0, 0, 1, 0, ] HTML5: Print custom Matrix (set to world) [0.73, 0.46, -0.84, 12, ] [-0.15, 1.80, 0.86, 32, ] [2.37, -0.62, 1.72, 54, ] [0, 0, 0, 1, ] Print 2D projection Matrices World [0.73, 0.46, -0.84, 12, ] [-0.15, 1.80, 0.86, 32, ] [2.37, -0.62, 1.72, 54, ] [0, 0, 0, 1, ] View [0.00, 0, 0, 0, ] [0, 0.01, 0, 0, ] [0, 0, 0.00, -0.00, ] [0, 0, 0, 1, ] Projection [1, 0, 0, -512, ] [0, 1, 0, -160, ] [0, 0, 1, 16000, ] [0, 0, 0, 1, ] Print 3D projection Matrices World [0.73, 0.46, -0.84, 12, ] [-0.15, 1.80, 0.86, 32, ] [2.37, -0.62, 1.72, 54, ] [0, 0, 0, 1, ] View [0.00, 0, 0, 0, ] [0, 0.01, 0, 0, ] [0, 0, 0.00, -0.00, ] [0, 0, 0, 1, ] Projection [1, 0, 0, -512, ] [0, 1, 0, -160, ] [0, 0, 1, 16000, ] [0, 0, 0, 1, ] | ||||

Steps To Reproduce | 1) Run sample on Windows 2) Run sample on HTML5 3) Compare the output | ||||

Tags | functions, html5, Runner | ||||

1.4 Found In | 1.99.533 | ||||

2.x Runtime Found In | |||||

2.x Runtime Verified In | 2.2.1.268 | ||||