|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003057||FSSCP||graphics||public||2014-06-12 05:34||2014-06-12 21:59|
|Target Version||3.7.2||Fixed in Version||3.7.2|
|Summary||0003057: Ships/weapons render as solid black in loadout previews with FS2-style animation.|
|Description||With newer AMD video cards, there's a known bug whereby the loadout renders are solid black for some reason. Additionally, if the FS1-style loadout animation is used, the model fails to appear at all. After diving into the shader code, it looks like the shaders were relying on undefined behavior for the pow() function (specifically, the OpenGL specification says pow() is undefined if the first argument is negative). With this knowledge in hand, I altered the default fragment shader to avoid calling pow() with a negative first argument and tweaked the values until I got a more familiar FS1-esque effect, and got the FS2 effect working again. Patch file attached.|
I would be very interested to know if this patch works even for people unaffected by the bug.
Note that this bug makes it impossible for me to compare this behavior with the old behavior. If my behavior is drastically different, the values can (hopefully) be tweaked to produce more consistent results.
|Steps To Reproduce||Impossible to miss by simply going to ship or weapon select with 3D models, if you're affected at all.|
|Additional Information||FS1-style animation under old shaders results in the model never showing up at all.|
|Tags||No tags attached.|
|Patch updated based on how the old shaders work for people not affected by this bug.|
Last edited: 2014-06-12 06:52
I never experienced this issue, but with the patch, I don't have anything breaking.
I do notice that (compared to Valathil's videos) that my FS2 effect wireframe lines are black instead of blue, regardless of patched or un-patched, but that is outside of the scope of this fix.
Clearly, I was sleep-deprived when I wrote the earlier patch, because an hour and a half of sleep pointed out a much, much, much simpler solution.
New patch uploaded.
|Following a discussion in #scp, a secondary patch has been added to restore the original blue wireframes.|
|Fix committed to trunk@10797.|
fs2open: trunk r10797
Timestamp: 2014-06-12 21:17:29
|Fix for Mantis 3057: Loadout (Ship/Weapon Select effect) rendering black models or no effect. Also corrects wireframe color for FS2 effect from black to blue. Committed on behalf of MageKing17.|
|mod - /trunk/fs2_open/code/globalincs/def_files.cpp|
|mod - /trunk/fs2_open/code/missionui/missionscreencommon.cpp|
|2014-06-12 05:34||MageKing17||New Issue|
|2014-06-12 05:34||MageKing17||Status||new => assigned|
|2014-06-12 05:34||MageKing17||Assigned To||=> MageKing17|
|2014-06-12 05:34||MageKing17||File Added: def_files.cpp.patch|
|2014-06-12 06:17||MageKing17||File Deleted: def_files.cpp.patch|
|2014-06-12 06:17||MageKing17||File Added: def_files.cpp.patch|
|2014-06-12 06:17||MageKing17||Note Added: 0015844|
|2014-06-12 06:18||MageKing17||Status||assigned => feedback|
|2014-06-12 06:18||MageKing17||Status||feedback => code review|
|2014-06-12 06:47||Zacam||Note Added: 0015845|
|2014-06-12 06:52||Zacam||Note Edited: 0015845||View Revisions|
|2014-06-12 20:43||MageKing17||File Deleted: def_files.cpp.patch|
|2014-06-12 20:44||MageKing17||File Added: def_files.cpp.patch|
|2014-06-12 20:45||MageKing17||Note Added: 0015847|
|2014-06-12 21:52||MageKing17||File Added: missionscreencommon.cpp.patch|
|2014-06-12 21:53||MageKing17||Note Added: 0015848|
|2014-06-12 21:57||Zacam||Product Version||=> 3.6.16|
|2014-06-12 21:57||Zacam||Fixed in Version||=> 3.7.2|
|2014-06-12 21:57||Zacam||Target Version||=> 3.7.2|
|2014-06-12 21:59||Zacam||Changeset attached||=> fs2open trunk r10797|
|2014-06-12 21:59||Zacam||Note Added: 0015849|
|2014-06-12 21:59||Zacam||Status||code review => resolved|
|2014-06-12 21:59||Zacam||Resolution||open => fixed|