From 9b8696d3dd92e2ed6f310ad0f0bf3c2182c9c6ae Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 11 Jun 2014 10:41:03 -0300 Subject: Light Baker! -=-=-=-=-=-= -Support for lightmap baker, have fun figuring out how it works before tutorial is published. --- servers/visual/rasterizer.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'servers/visual/rasterizer.h') diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index a3cdff9859..0aa7fc2650 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -302,6 +302,11 @@ public: virtual void multimesh_set_visible_instances(RID p_multimesh,int p_visible)=0; virtual int multimesh_get_visible_instances(RID p_multimesh) const=0; + /* BAKED LIGHT */ + + + + /* IMMEDIATE API */ virtual RID immediate_create()=0; @@ -490,6 +495,20 @@ public: typedef Map ParamOverrideMap; + struct BakedLightData { + + VS::BakedLightMode mode; + RID octree_texture; + float color_multiplier; //used for both lightmaps and octree + Transform octree_transform; + Map lightmaps; + //cache + + float octree_lattice_size; + float octree_lattice_divide; + int octree_steps; + Vector2 octree_tex_pixel_size; + }; struct InstanceData { @@ -498,6 +517,8 @@ public: RID material_override; Vector light_instances; Vector morph_values; + BakedLightData *baked_light; + Transform *baked_light_octree_xform; bool mirror :8; bool depth_scale :8; bool billboard :8; -- cgit v1.2.3