From a6f96f46b779a815b03974fece21728fe32e88d2 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 10 Mar 2015 21:05:49 -0300 Subject: small optimizations to isometric light demo should work faster, and even faster if exported.. as textures have been optimized. --- servers/visual_server.h | 1 + 1 file changed, 1 insertion(+) (limited to 'servers/visual_server.h') diff --git a/servers/visual_server.h b/servers/visual_server.h index 9404ea040c..8f1a0d1529 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -1005,6 +1005,7 @@ public: virtual RID canvas_light_create()=0; virtual void canvas_light_attach_to_canvas(RID p_light,RID p_canvas)=0; virtual void canvas_light_set_enabled(RID p_light, bool p_enabled)=0; + virtual void canvas_light_set_scale(RID p_light, float p_scale)=0; virtual void canvas_light_set_transform(RID p_light, const Matrix32& p_transform)=0; virtual void canvas_light_set_texture(RID p_light, RID p_texture)=0; virtual void canvas_light_set_texture_offset(RID p_light, const Vector2& p_offset)=0; -- cgit v1.2.3 From 650e13f3cd68c9b45879a905548c34e9fb5bb46f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 12 Mar 2015 01:05:50 -0300 Subject: back buffer copy node, to improve on texscreen() back buffer copy node and respective demo --- servers/visual_server.h | 1 + 1 file changed, 1 insertion(+) (limited to 'servers/visual_server.h') diff --git a/servers/visual_server.h b/servers/visual_server.h index 8f1a0d1529..f4896f984e 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -994,6 +994,7 @@ public: virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable)=0; virtual void canvas_item_set_z(RID p_item, int p_z)=0; virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable)=0; + virtual void canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable,const Rect2& p_rect)=0; virtual void canvas_item_clear(RID p_item)=0; virtual void canvas_item_raise(RID p_item)=0; -- cgit v1.2.3 From 53e1694e1e2b76026d862e84c1de88f62601cbc3 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 16 Mar 2015 00:47:37 -0300 Subject: New option to send canvas to render buffer allows to use 3D environment effects for post processing such as Glow, Bloom, HDR, etc. in 2D. --- servers/visual_server.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'servers/visual_server.h') diff --git a/servers/visual_server.h b/servers/visual_server.h index f4896f984e..c748839d1e 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -704,6 +704,7 @@ public: virtual void viewport_set_hide_scenario(RID p_viewport,bool p_hide)=0; virtual void viewport_set_hide_canvas(RID p_viewport,bool p_hide)=0; + virtual void viewport_set_disable_environment(RID p_viewport,bool p_disable)=0; virtual void viewport_attach_camera(RID p_viewport,RID p_camera)=0; virtual void viewport_set_scenario(RID p_viewport,RID p_scenario)=0; @@ -734,8 +735,7 @@ public: ENV_BG_COLOR, ENV_BG_TEXTURE, ENV_BG_CUBEMAP, - ENV_BG_TEXTURE_RGBE, - ENV_BG_CUBEMAP_RGBE, + ENV_BG_CANVAS, ENV_BG_MAX }; @@ -744,6 +744,7 @@ public: enum EnvironmentBGParam { + ENV_BG_PARAM_CANVAS_MAX_LAYER, ENV_BG_PARAM_COLOR, ENV_BG_PARAM_TEXTURE, ENV_BG_PARAM_CUBEMAP, -- cgit v1.2.3 From acc6f3b285f058104fd6431bed2c4cfe4dc05a58 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 21 Mar 2015 00:43:33 -0300 Subject: signed distance field font support --- servers/visual_server.h | 1 + 1 file changed, 1 insertion(+) (limited to 'servers/visual_server.h') diff --git a/servers/visual_server.h b/servers/visual_server.h index c748839d1e..b6d354454e 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -969,6 +969,7 @@ public: virtual void canvas_item_set_transform(RID p_item, const Matrix32& p_transform)=0; virtual void canvas_item_set_clip(RID p_item, bool p_clip)=0; + virtual void canvas_item_set_distance_field_mode(RID p_item, bool p_enable)=0; virtual void canvas_item_set_custom_rect(RID p_item, bool p_custom_rect,const Rect2& p_rect=Rect2())=0; virtual void canvas_item_set_opacity(RID p_item, float p_opacity)=0; virtual float canvas_item_get_opacity(RID p_item, float p_opacity) const=0; -- cgit v1.2.3 From 9fa1698c7420bae2c6353bf300ce2cdb73434bf6 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 3 Apr 2015 01:43:37 -0300 Subject: Changes to Light -=-=-=-=-=-=-=-= -Changed material unshaded property for an enum, which supports light-only shading -Added a "Mix" shading mode, useful for using lights as masks -Added energy parameter to Light2D --- servers/visual_server.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'servers/visual_server.h') diff --git a/servers/visual_server.h b/servers/visual_server.h index b6d354454e..e9425afbab 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -1014,12 +1014,19 @@ public: virtual void canvas_light_set_texture_offset(RID p_light, const Vector2& p_offset)=0; virtual void canvas_light_set_color(RID p_light, const Color& p_color)=0; virtual void canvas_light_set_height(RID p_light, float p_height)=0; + virtual void canvas_light_set_energy(RID p_light, float p_energy)=0; virtual void canvas_light_set_z_range(RID p_light, int p_min_z,int p_max_z)=0; virtual void canvas_light_set_layer_range(RID p_light, int p_min_layer,int p_max_layer)=0; virtual void canvas_light_set_item_mask(RID p_light, int p_mask)=0; virtual void canvas_light_set_item_shadow_mask(RID p_light, int p_mask)=0; - virtual void canvas_light_set_subtract_mode(RID p_light, bool p_enable)=0; + enum CanvasLightMode { + CANVAS_LIGHT_MODE_ADD, + CANVAS_LIGHT_MODE_SUB, + CANVAS_LIGHT_MODE_MIX, + }; + + virtual void canvas_light_set_mode(RID p_light, CanvasLightMode p_mode)=0; virtual void canvas_light_set_shadow_enabled(RID p_light, bool p_enabled)=0; virtual void canvas_light_set_shadow_buffer_size(RID p_light, int p_size)=0; virtual void canvas_light_set_shadow_esm_multiplier(RID p_light, float p_multiplier)=0; @@ -1049,7 +1056,15 @@ public: virtual void canvas_item_material_set_shader(RID p_material, RID p_shader)=0; virtual void canvas_item_material_set_shader_param(RID p_material, const StringName& p_param, const Variant& p_value)=0; virtual Variant canvas_item_material_get_shader_param(RID p_material, const StringName& p_param) const=0; - virtual void canvas_item_material_set_unshaded(RID p_material, bool p_unshaded)=0; + + + enum CanvasItemShadingMode { + CANVAS_ITEM_SHADING_NORMAL, + CANVAS_ITEM_SHADING_UNSHADED, + CANVAS_ITEM_SHADING_ONLY_LIGHT, + }; + + virtual void canvas_item_material_set_shading_mode(RID p_material, CanvasItemShadingMode p_mode)=0; /* CURSOR */ virtual void cursor_set_rotation(float p_rotation, int p_cursor = 0)=0; // radians -- cgit v1.2.3