X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Feffects%2Fenvironmentmap.cpp;h=1448c49cfd844165770b5c330b2091f1b437ef49;hb=8fe8ab4d4a92520e24a248042c187a8d9778be1f;hp=977822ac710601f6b1333ec82238ae1c05424df5;hpb=233dff2a6c552e08da832496aecd88ef4f8948f1;p=libs%2Fgl.git diff --git a/source/effects/environmentmap.cpp b/source/effects/environmentmap.cpp index 977822ac..1448c49c 100644 --- a/source/effects/environmentmap.cpp +++ b/source/effects/environmentmap.cpp @@ -106,14 +106,10 @@ void EnvironmentMap::render(Renderer &renderer, Tag tag) const Renderer::Push _push_rend(renderer); - unsigned unit = renderer.allocate_effect_texunit(); - shdata.uniform("environment_map", static_cast(unit)); - Bind _bind_sampler(sampler, unit); - Bind _bind_env(env_tex, unit); - const Matrix &camera_matrix = renderer.get_camera()->get_object_matrix(); shdata.uniform("env_eye_matrix", camera_matrix.block<3, 3>(0, 0)); + renderer.set_texture("environment_map", &env_tex, &sampler); renderer.add_shader_data(shdata); renderer.render(renderable, tag); }