From: Mikko Rasa Date: Mon, 2 Jul 2018 15:00:30 +0000 (+0300) Subject: Disable mipmaps from various render target textures X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9319f1c8ed99866966f20fbab952da673af2257e;p=libs%2Fgl.git Disable mipmaps from various render target textures --- diff --git a/source/ambientocclusion.cpp b/source/ambientocclusion.cpp index 91e10ad7..2378bcc7 100644 --- a/source/ambientocclusion.cpp +++ b/source/ambientocclusion.cpp @@ -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) diff --git a/source/colorcurve.cpp b/source/colorcurve.cpp index 40f61b81..54fbc767 100644 --- a/source/colorcurve.cpp +++ b/source/colorcurve.cpp @@ -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); diff --git a/source/environmentmap.cpp b/source/environmentmap.cpp index 9c4df092..1cc58914 100644 --- a/source/environmentmap.cpp +++ b/source/environmentmap.cpp @@ -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); diff --git a/source/rendertarget.cpp b/source/rendertarget.cpp index 8a53e66d..c651e665 100644 --- a/source/rendertarget.cpp +++ b/source/rendertarget.cpp @@ -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); diff --git a/source/shadowmap.cpp b/source/shadowmap.cpp index 51583046..921a1747 100644 --- a/source/shadowmap.cpp +++ b/source/shadowmap.cpp @@ -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();