From: Mikko Rasa Date: Sat, 11 Dec 2021 18:18:34 +0000 (+0200) Subject: Bind only the first mipmap level when prefiltering an envmap X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9f8dcf5ab9c0aa74814ecb52766f339013fcee9b;p=libs%2Fgl.git Bind only the first mipmap level when prefiltering an envmap --- diff --git a/source/effects/environmentmap.cpp b/source/effects/environmentmap.cpp index 614b1252..2caecb56 100644 --- a/source/effects/environmentmap.cpp +++ b/source/effects/environmentmap.cpp @@ -143,7 +143,7 @@ void EnvironmentMap::setup_frame(Renderer &renderer) renderer.set_framebuffer(&irradiance_fbo); renderer.set_shader_program(&irradiance_shprog, &prefilter_shdata); - renderer.set_texture("environment_map", &env_tex, &sampler); + renderer.set_texture("environment_map", &env_tex, 0, &sampler); fullscreen_mesh.draw(renderer); renderer.set_shader_program(&specular_shprog);