shdata(0),
material(0),
back_faces(false),
- receive_shadows(false)
+ receive_shadows(false),
+ image_based_lighting(false)
{ }
void RenderPass::set_material_textures()
map<string, int> extra_spec;
if(receive_shadows)
extra_spec["use_shadow_map"] = true;
+ if(image_based_lighting)
+ extra_spec["use_image_based_lighting"] = true;
shprog = material->create_compatible_shader(extra_spec);
+ shprog.keep();
if(shdata)
shdata = new ProgramData(*shdata, shprog.get());
void RenderPass::Loader::init_actions()
{
add("shader", &Loader::shader);
+ add("image_based_lighting", &RenderPass::image_based_lighting);
add("material", &Loader::material_inline);
add("material", &Loader::material);
add("material_slot", &RenderPass::material_slot);