Real v5 cel shading#5
Conversation
| if bpy.context.scene.celShadingPatch: | ||
| data.source += '#define G_CELSHADING 0x00400000\n\n' |
There was a problem hiding this comment.
the microcode patch should probably have this defined in gbi.h, or else there could be a risk of getting a bunch of redefinition errors
There was a problem hiding this comment.
gbi.h is provided by z64hdr in the case of Triforce%, so it's not possible to be changed in that project. Perhaps in a decomp-based toolchain people will be willing to edit their own gbi.h when they apply the microcode change as well. However, please keep in mind that redefining a macro to the exact same thing as it was already defined to is not an error, it's silently ignored by the preprocessor.
|
|
||
| return fMaterial, texDimensions | ||
|
|
||
| def getCelShadingInfo(material): |
There was a problem hiding this comment.
to me it seems like CelShadingInfo is used enough where it could warrant some type of class or definition, as well as the levels. then we can add type annotations everywhere and keep things in sync easier
| triGroup, | ||
| existingVertexData, | ||
| existingVertexMaterialRegions, | ||
| celShadingInfo |
There was a problem hiding this comment.
if you create a CelShadingInfo class this would be a great place for a type annotation
thecozies
left a comment
There was a problem hiding this comment.
looks pretty good so far, i have a few suggestions for documentation but i think the implementation should work well. i'll need to test sm64 exports with this and regression test. one concern of mine is making sure that the user's presets are retained
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
* Fixed incorrect CI textures on import for OOT. Fixed bug where CI textures would be corrupted when importing OOT display lists. * Minor name changes/tweaks. * Added more informative comments, formatted with black
…Fast-64#135) * Fixed operator data_type argument for blender 3.3 * Switched to API instead of using operators
* Black format files touched by texture saving PR * Black format files touched by flipbook PR
OoT scene lighting
Cel shading has been translated to fast-64/V5 (formatting only) and then to thecozies/V5 (actual V5).
Lighten/darken mode has been removed and replaced with "fixed" mode, where a tint level and tint color is set in the DL, or "segment" mode, where a segment contains (possibly) multiple tint settings like:
enabling the tint colors and levels to be set dynamically from actor code to reflect nearby lighting conditions.
There is no previewing of any of this; what is shown in the GUI is the material without any tint. It will take noticeable changes to the nodes to support previewing this.