]> git.tdb.fi Git - libs/gl.git/commitdiff
Bind only the first mipmap level when prefiltering an envmap
authorMikko Rasa <tdb@tdb.fi>
Sat, 11 Dec 2021 18:18:34 +0000 (20:18 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 11 Dec 2021 18:18:34 +0000 (20:18 +0200)
source/effects/environmentmap.cpp

index 614b1252b26ba7b2177bf40c3cb9803e4b052a9f..2caecb56982a519ff65c12ca1ffdb6c96498316e 100644 (file)
@@ -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);