diff --git a/src/CRE/render_manager.cpp b/src/CRE/render_manager.cpp index e1a7e9b9..0267b63a 100644 --- a/src/CRE/render_manager.cpp +++ b/src/CRE/render_manager.cpp @@ -1703,8 +1703,8 @@ static void draw_pass_3d_shadow_set(Shadow* shad, render_context* rctx) { rctx->obj_scene.g_shadow_ambient1 = 0.0f; } - gl_state_bind_sampler(6, rctx->render_samplers[0]); - gl_state_bind_sampler(7, rctx->render_samplers[0]); + gl_state_bind_sampler(6, 0); + gl_state_bind_sampler(7, 0); } static void draw_pass_3d_translucent(render_context* rctx, bool opaque_enable, diff --git a/src/CRE/render_texture.cpp b/src/CRE/render_texture.cpp index 4fb1142a..031813b9 100644 --- a/src/CRE/render_texture.cpp +++ b/src/CRE/render_texture.cpp @@ -90,8 +90,6 @@ int32_t RenderTexture::Init(int32_t width, int32_t height, glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); } - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); gl_state_bind_texture_2d(0); } else { diff --git a/src/CRE/texture.cpp b/src/CRE/texture.cpp index 208fcc4f..b366a791 100644 --- a/src/CRE/texture.cpp +++ b/src/CRE/texture.cpp @@ -376,8 +376,10 @@ void texture_params_get(GLuint tex_0, texture_param* tex_0_param, void texture_params_restore(texture_param* tex_0_param, texture_param* tex_1_param, texture_param* tex_2_param) { - for (int32_t i = 0; i < 4; i++) + for (int32_t i = 0; i < 4; i++) { gl_state_active_bind_texture_2d(i, 0); + gl_state_bind_sampler(i, 0); + } } bool texture_txp_set_load(txp_set* t, texture*** texs, uint32_t* ids) {