Disable mipmaps from various render target textures
authorMikko Rasa <tdb@tdb.fi>
Mon, 2 Jul 2018 15:00:30 +0000 (18:00 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 2 Jul 2018 15:00:30 +0000 (18:00 +0300)
source/ambientocclusion.cpp
source/colorcurve.cpp
source/environmentmap.cpp
source/rendertarget.cpp
source/shadowmap.cpp

index 91e10ad7a4f33f4325cc12762fe65a5e2e347148..2378bcc78cb323e21439b01c601c8f5590a4ab3c 100644 (file)
@@ -21,7 +21,7 @@ AmbientOcclusion::AmbientOcclusion(unsigned w, unsigned h, float):
        texturing.attach(2, occlude_target.get_target_texture(RENDER_COLOR));
 
        unsigned seed = 1;
-       rotate_lookup.storage(RGBA, 4, 4);
+       rotate_lookup.storage(RGBA, 4, 4, 1);
        rotate_lookup.set_filter(NEAREST);
        unsigned char data[64];
        for(unsigned i=0; i<16; ++i)
index 40f61b813dd088171beeea361b92dc91dac11a6e..54fbc767bb77a75ce19356d446a7c38d13526b52 100644 (file)
@@ -18,7 +18,7 @@ ColorCurve::ColorCurve():
        shdata.uniform("source", 0);
        shdata.uniform("curve", 1);
 
-       curve.storage(LUMINANCE, 256);
+       curve.storage(LUMINANCE, 256, 1);
        curve.set_min_filter(LINEAR);
        curve.set_wrap(CLAMP_TO_EDGE);
        texturing.attach(1, curve);
index 9c4df092481789d270669450b18f21b6ff71f1e4..1cc589143e78da5cc1d47cf456f2f6360613d2ac 100644 (file)
@@ -17,7 +17,7 @@ EnvironmentMap::EnvironmentMap(unsigned s, Renderable &r, Renderable &e):
        update_interval(1),
        update_delay(0)
 {
-       env_tex.storage(RGB, size);
+       env_tex.storage(RGB, size, 1);
        env_tex.set_wrap(CLAMP_TO_EDGE);
        env_tex.set_min_filter(LINEAR);
        depth_buf.storage(DEPTH_COMPONENT, size, size);
index 8a53e66d2bac06b7adead7bebac9c7d3104f26ef..c651e665fc46064ea2870e7034da0ab93ce081c5 100644 (file)
@@ -133,7 +133,7 @@ void RenderTarget::init(unsigned w, unsigned h, unsigned s, const RenderTargetFo
                else
                {
                        tgt.texture = new Texture2D;
-                       tgt.texture->storage(pf, width, height);
+                       tgt.texture->storage(pf, width, height, 1);
                        tgt.texture->set_filter(NEAREST);
                        tgt.texture->set_wrap(CLAMP_TO_EDGE);
                        fbo.attach(att, *tgt.texture);
index 515830461cd02b9ec103038336e34ee7d6f11269..921a1747875b4bf0b349042dac6aab26095cff84 100644 (file)
@@ -24,7 +24,7 @@ ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l):
        depth_buf.set_compare_enabled(true);
        depth_buf.set_compare_func(LEQUAL);
        depth_buf.set_wrap(CLAMP_TO_EDGE);
-       depth_buf.storage(DEPTH_COMPONENT, size, size);
+       depth_buf.storage(DEPTH_COMPONENT, size, size, 1);
        fbo.attach(DEPTH_ATTACHMENT, depth_buf, 0);
        fbo.require_complete();