View Issue Details

IDProjectCategoryView StatusLast Update
0003082FSSCPgraphicspublic2022-06-10 21:43
Reporterzookeeper Assigned ToEchelon9  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionsuspended 
Summary0003082: gr.drawModel draws model inside out if rendering to texture
DescriptionIf the gr.drawModel scripting function is used for example in an $On Frame hook, it renders the model correctly, except if we're rendering to a texture, in which case the model gets rendered with its polys seemingly inverted.

I recently fixed some similar'ish bugs pertaining to the RTT code, but this one persists and I haven't been able to figure it out despite spending countless hours on it. I did conclude that it's not a case of the projection matrix being any different depending on whether doing RTT or not (except the difference due to target aspect ratio), and didn't find any indication of anything else being wrong with the setup of the matrices (gr_set_proj_matrix/gr_opengl_set_projection_matrix and gr_set_view_matrix/gr_opengl_set_view_matrix), but of course I might have missed something.

Attached is a simple test mod consisting only of one script, which 1) renders the player ship's model in front of the camera onto a texture and then 2) draws the texture in the top left corner of the screen.

The commented-out lines in the script are for using a custom camera, which isn't needed for reproducing but any fix should probably be tested with those lines uncommented as well, because in real usage one would almost always use a custom camera like that, and it might very well be affected by the fix one way or another.
TagsNo tags attached.

Activities

zookeeper

2014-08-03 18:48

developer  

rtttestmod.zip (1,394 bytes)

MjnMixael

2022-06-10 21:24

manager   ~0017139

Confirmed still an issue in 22.2 RC1

MjnMixael

2022-06-10 21:43

manager   ~0017140

Migrated to GitHub.

https://github.com/scp-fs2open/fs2open.github.com/issues/4385

Issue History

Date Modified Username Field Change
2014-08-03 18:48 zookeeper New Issue
2014-08-03 18:48 zookeeper File Added: rtttestmod.zip
2015-06-26 11:25 Echelon9 Assigned To => Echelon9
2015-06-26 11:25 Echelon9 Status new => assigned
2022-06-10 21:24 MjnMixael Note Added: 0017139
2022-06-10 21:43 MjnMixael Status assigned => closed
2022-06-10 21:43 MjnMixael Resolution open => suspended
2022-06-10 21:43 MjnMixael Note Added: 0017140