/*
   POV-Ray lightmapping helper - Jaime Vives Piqueres, 2011
   --
   File generated by prepare_baking.jar

   This file declares the materials depending on the baking step.
   For the tests and baking renders, it uses just plain white pigments.
   For the baked rendering it uses the lightmaps to modulate the
   pigments: a macro provides a way to customize the baked texture.
*/

#include "colors.inc"


// material excluded from baking
#declare default_=material{texture{pigment{rgb 1}}}

#if (use_baking<2)
// plain white for tests and lightmap baking ("baking materials")

#declare chair_legs_=material{texture{pigment{rgb 1}}}


#declare chair_seat_=material{texture{pigment{rgb 1}}}


#declare room_ceiling_=material{texture{pigment{rgb 1}}}


#declare room_flooring_=material{texture{pigment{rgb 1}}}


#declare room_walls_=material{texture{pigment{rgb 1}}}



#else
// full textures for lightmap loading ("baked materials")

#declare p_lightmap0=pigment{image_map{exr "lightmaps/chair_legs_.exr" interpolate 2}}
#declare chair_legs_=material{
 baked_texture(
  p_lightmap0,
  pigment{White},
  finish{},
  normal{bumps 0}
 )
}


#declare p_lightmap1=pigment{image_map{exr "lightmaps/chair_seat_.exr" interpolate 2}}
#declare chair_seat_=material{
 baked_texture(
  p_lightmap1,
  pigment{White},
  finish{},
  normal{bumps 0}
 )
}


#declare p_lightmap3=pigment{image_map{exr "lightmaps/room_ceiling_.exr" interpolate 2}}
#declare room_ceiling_=material{
 baked_texture(
  p_lightmap3,
  pigment{White},
  finish{},
  normal{bumps 0}
 )
}


#declare p_lightmap4=pigment{image_map{exr "lightmaps/room_flooring_.exr" interpolate 2}}
#declare room_flooring_=material{
 baked_texture(
  p_lightmap4,
  pigment{White},
  finish{},
  normal{bumps 0}
 )
}


#declare p_lightmap5=pigment{image_map{exr "lightmaps/room_walls_.exr" interpolate 2}}
#declare room_walls_=material{
 baked_texture(
  p_lightmap5,
  pigment{White},
  finish{},
  normal{bumps 0}
 )
}



#end
