#include "renderer.h"
#include "texture.h"
#include "texture2d.h"
-#include "texturing.h"
#include "uniform.h"
using namespace std;
{
const Tag *material_texture_tags = material->get_texture_tags();
for(const Tag *tag=material_texture_tags; tag->id; ++tag)
- set_texture(*tag, material->get_texture(*tag), material->get_sampler());
+ set_texture(*tag, material->get_texture(*tag), material->get_sampler(*tag));
}
void RenderPass::maybe_create_material_shader()
{
for(vector<TextureSlot>::const_iterator i=textures.begin(); i!=textures.end(); ++i)
renderer.set_texture(i->tag, i->texture, i->sampler);
- renderer.set_material(material);
renderer.set_shader_program(shprog, shdata.get());
+ if(material)
+ renderer.add_shader_data(material->get_shader_data());
renderer.set_reverse_winding(back_faces);
}