diff --git a/BlenderMalt/MaltLights.py b/BlenderMalt/MaltLights.py index 2154470b..51233e23 100644 --- a/BlenderMalt/MaltLights.py +++ b/BlenderMalt/MaltLights.py @@ -12,18 +12,18 @@ def sync_data(self, context): light.spot_blend = self.spot_blend_angle / self.spot_angle strength : bpy.props.FloatProperty(name='Strength', default=1, - options={'LIBRARY_EDITABLE'}, override={'LIBRARY_OVERRIDABLE'}) + options={'LIBRARY_EDITABLE', 'ANIMATABLE'}, override={'LIBRARY_OVERRIDABLE'}) override_global_settings : bpy.props.BoolProperty(name='Override Global Settings', default=False, options={'LIBRARY_EDITABLE'}, override={'LIBRARY_OVERRIDABLE'}) max_distance : bpy.props.FloatProperty(name='Max Distance', default=100, - options={'LIBRARY_EDITABLE'}, override={'LIBRARY_OVERRIDABLE'}) + options={'LIBRARY_EDITABLE', 'ANIMATABLE'}, override={'LIBRARY_OVERRIDABLE'}) radius : bpy.props.FloatProperty( name='Radius', default=5, update=sync_data, - options={'LIBRARY_EDITABLE'}, + options={'LIBRARY_EDITABLE', 'ANIMATABLE'}, override={'LIBRARY_OVERRIDABLE'} ) spot_angle : bpy.props.FloatProperty( @@ -33,7 +33,7 @@ def sync_data(self, context): min=0, max=math.pi, update=sync_data, - options={'LIBRARY_EDITABLE'}, + options={'LIBRARY_EDITABLE', 'ANIMATABLE'}, override={'LIBRARY_OVERRIDABLE'} ) spot_blend_angle : bpy.props.FloatProperty( @@ -43,7 +43,7 @@ def sync_data(self, context): min=0, max=math.pi, update=sync_data, - options={'LIBRARY_EDITABLE'}, + options={'LIBRARY_EDITABLE', 'ANIMATABLE'}, override={'LIBRARY_OVERRIDABLE'} ) diff --git a/Malt/Shaders/Filters/Line.glsl b/Malt/Shaders/Filters/Line.glsl index aec95ce9..c99656ad 100644 --- a/Malt/Shaders/Filters/Line.glsl +++ b/Malt/Shaders/Filters/Line.glsl @@ -281,7 +281,7 @@ LineExpandOutput line_expand(vec2 uv, int max_width, for(int y = -max_half_width; y <= max_half_width; y++) { vec2 offset = vec2(x,y); - float offset_length = length(offset); + float offset_length = length(offset) - 0.5; vec2 offset_uv = uv + offset / resolution; float offset_width = texture(line_width_texture, offset_uv)[line_width_channel] * line_width_scale; @@ -293,6 +293,15 @@ LineExpandOutput line_expand(vec2 uv, int max_width, float offset_line_depth = texture(depth_texture, offset_uv)[depth_channel]; float offset_line_ldepth = -depth_to_z(offset_line_depth); uint offset_line_id = texture(id_texture, offset_uv)[id_channel]; + + if(offset_length <= 0 && offset_width <= 1.0) + { + offset_line_color.a *= offset_width; + } + else + { + offset_line_color.a *= clamp(offset_width / 2.0 - offset_length, 0.0, 1.0); + } float alpha = offset_line_color.a; float random_ldepth_offset = hash(vec4(offset, float(SAMPLE_COUNT), hash(uv).x)).x;