Merging phase 1 of the BGE Harmony branch:

* Shadow color now usable in the BGE
 * Simplified the shadow panel while "Blender Game" renderer is active
 * Added variance shadow maps for the BGE
 * Buffered shadows on sun lamps in the BGE (orthographic)
 * Light textures in the BGE
This commit is contained in:
2012-05-01 02:50:17 +00:00
parent 7cb037db86
commit ae4fda82b0
29 changed files with 2414 additions and 1705 deletions

View File

@@ -186,11 +186,62 @@ class DATA_PT_sunsky(DataButtonsPanel, Panel):
sub = col.column(align=True)
sub.prop(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
class DATA_PT_shadow_game(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shadow"
COMPAT_ENGINES = {'BLENDER_GAME'}
@classmethod
def poll(cls, context):
COMPAT_LIGHTS = {'SPOT', 'SUN'}
lamp = context.lamp
engine = context.scene.render.engine
return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
lamp = context.lamp
self.layout.prop(lamp, "use_shadow", text="")
def draw(self, context):
layout = self.layout
lamp = context.lamp
split = layout.split()
col = split.column()
col.prop(lamp, "shadow_color", text="")
col = split.column()
col.prop(lamp, "use_shadow_layer", text="This Layer Only")
col.prop(lamp, "use_only_shadow")
col = layout.column()
col.label("Buffer Type:")
col.prop(lamp, "ge_shadow_buffer_type", text="", toggle=True)
col.label("Quality:")
col = layout.column(align=True)
col.prop(lamp, "shadow_buffer_size", text="Size")
col.prop(lamp, "shadow_buffer_bias", text="Bias")
col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
row = layout.row()
row.label("Clipping:")
row = layout.row(align=True)
row.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
row.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
if lamp.type == 'SUN':
row = layout.row()
row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
layout.active = lamp.use_shadow
class DATA_PT_shadow(DataButtonsPanel, Panel):
bl_label = "Shadow"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):