-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix merge conflicts from mat_bleed PR. #1
Conversation
* added material bleeding to FMesh objects via an export option in the global F3D panel settings * fixed tile scrolls with inline mats, tile scrolls now repeat in each inline material, and use a material name of the mesh plus the offset of the material DL inside the inline mesh Gfx. Also fixed a bug where tile scrolls for tiles not set would still export, resulting in UB behavior * removed comments * optimized and cleaned up mat bleeding setup code, improved which gbi cmds get bled * made inline a property of fMaterial, made fMaterials be generated from fModel for inheritance of inline property, cleaned up and clarified some comments * added a comment_name prop to GfxList to prevent renaming of bled fMesh.draw objects interfering with DL referencing * added hashing to gbi base classes * made tile scroll exporting better in mat_bleeding, renamed variables, added more consistency with inline checks, made fMesh inline exporting act from FMesh.draw instead of constructing from individual gfx components, vtx culling now works with inline materials * renamed variables, cleaned up bleed functions, added extra callback functions to bleed methods, changed set tile calculation to happen during bleed, made inline property of subclasses occur on initialization instead of within the class, fixed .bleed method of sync classes, made bleed more isolated by adding pre and post processing, and removing inline checks throughout f3d writing * fixed issue with bleed not working on fMesh objects that revert materials at the end * optimized bleed for large textures, removed some vestigial code from old texture scroll format, added extra faisafe to bleed so it doesn't execute while using certain export modes while inline setting is not checked * added in support for bleeds in sm64 armatures * removed useless sync from bled gfxLists with no drawn tris, fixed bleed logic for trigroups and tile size cmds * made bleeding its own class instead of being a part of the fMesh class * removed inline bool and logic from everything but fModel, and centralized logic throughout code so that it works with those changes * separated mat bleed into its own file, changed where mat write method is overridden from inside FModel to its initialization calls * made render mode reset cmd work gooder and cleaned up on_bleed_end * removed inline prop from fModel, made constructor of fModel classes and subclasses explicit from passed arguments * removed inline prop from OOTModel classes * removed inline argument from FModel.to_c_scroll * Fixed duplicate scroll variable names with inlined meshes with multiple scroll materials * fixed bleeding for geo layouts when rooms are used, optimized how last used materials are kept track of during jump nodes * clear out last used material in last_materials dict for geo layout bleed if culling is used * added fix to other mode encoding if using f3d_old exporting --------- Co-authored-by: scut <scut> Co-authored-by: kurethedead <epicureanistik@gmail.com>
Fixed save_textures() error when "Save Textures As PNGs" is enabled
…rts (Fast-64#218) Co-authored-by: scut <scut>
…tureDLs go to a single gfx_list instead of separate ones per tile
I made some updates to the texture bleeding. The first is that I made it so that there is only one gfx_list for texture data, and that that gfx_list is the one being used for storing texture data. |
Looks good to me! |
The important changes are in f3d_texture_writer, everything else should be already a part of the bleed PR.
About the changes there, for mat bleed to work more efficiently, I created different GfxLists for the material cmds, and the tiles. These get combined together into fMaterial.material at the end of material saving, namely
fModel.onMaterialCommandsBuilt(fMaterial, material, drawLayer)
. In order for mat bleed to work properly, I changed the saved GfxLists inside of themultitexManager.writeAll
to the necessary ones. For large textures, the GfxList is already set to be the FTriGroup.triList, which is already accounted for inside of the bleed function.Other than that, the only things that should have been changed are
saveOtherModeHDefinition
to pass in an extra argument of f3d, and two lines inf3d_bleed
to remove the use offMaterial.useLargeTextures
.Speaking of that, while looking through the changes and testing, I found an issue in sm64_geolayout_writer where this is still used. I left a comment on the offending line.