Browse Source

Merge pull request #362 from Hazado/DrawLate

Add Late Render Pass
pull/365/head
Adam Johnson 2 years ago committed by GitHub
parent
commit
f907d26bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      korman/exporter/mesh.py
  2. 4
      korman/properties/modifiers/base.py
  3. 7
      korman/properties/modifiers/render.py

2
korman/exporter/mesh.py

@ -94,6 +94,8 @@ class _RenderLevel:
return self._calc_level(self.MAJOR_FRAMEBUF) return self._calc_level(self.MAJOR_FRAMEBUF)
elif mods.test_property("draw_opaque"): elif mods.test_property("draw_opaque"):
return self._calc_level(self.MAJOR_OPAQUE) return self._calc_level(self.MAJOR_OPAQUE)
elif mods.test_property("draw_late"):
return self._calc_level(self.MAJOR_LATE)
elif mods.test_property("draw_no_defer"): elif mods.test_property("draw_no_defer"):
blend_span = False blend_span = False

4
korman/properties/modifiers/base.py

@ -45,6 +45,10 @@ class PlasmaModifierProperties(bpy.types.PropertyGroup):
def draw_no_defer(self): def draw_no_defer(self):
"""Disallow geometry being sorted into a blending span""" """Disallow geometry being sorted into a blending span"""
return False return False
@property
def draw_late(self):
return False
@property @property
def enabled(self): def enabled(self):

7
korman/properties/modifiers/render.py

@ -49,7 +49,8 @@ class PlasmaBlendMod(PlasmaModifierProperties):
items=[("AUTO", "(Auto)", "Let Korman decide when to render this object."), items=[("AUTO", "(Auto)", "Let Korman decide when to render this object."),
("OPAQUE", "Before Avatar", "Prefer for the object to draw before the avatar."), ("OPAQUE", "Before Avatar", "Prefer for the object to draw before the avatar."),
("FRAMEBUF", "Frame Buffer", "Prefer for the object to draw after the avatar but before other blended objects."), ("FRAMEBUF", "Frame Buffer", "Prefer for the object to draw after the avatar but before other blended objects."),
("BLEND", "Blended", "Prefer for the object to draw after most other geometry in the blended pass.")], ("BLEND", "Blended", "Prefer for the object to draw after most other geometry in the blended pass."),
("LATE", "Late", "Prefer for the object to draw after all other alpha-blended objects.")],
options=set()) options=set())
sort_faces = EnumProperty(name="Sort Faces", sort_faces = EnumProperty(name="Sort Faces",
description="", description="",
@ -73,6 +74,10 @@ class PlasmaBlendMod(PlasmaModifierProperties):
def draw_framebuf(self): def draw_framebuf(self):
return self.render_level == "FRAMEBUF" return self.render_level == "FRAMEBUF"
@property
def draw_late(self):
return self.render_level == "LATE"
@property @property
def draw_no_defer(self): def draw_no_defer(self):
return self.render_level != "BLEND" return self.render_level != "BLEND"

Loading…
Cancel
Save