Skip to content

Commit 5ec001e

Browse files
committed
fix indxx 255 showing up as black
index 255 shows up black as the uv index goes to 1.0 which is past the edge of the palette texture. so make the palette wrap clamp to edge
1 parent c8676bd commit 5ec001e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/Managers/PostProcessMan.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ void PostProcessMan::CreateGLBackBuffers() {
125125
GL_CHECK(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, c_PaletteEntriesNumber, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0));
126126
GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
127127
GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
128+
GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
129+
GL_CHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
128130
UpdatePalette();
129131
GL_CHECK(glActiveTexture(GL_TEXTURE0));
130132
m_ProjectionMatrix = std::make_unique<glm::mat4>(glm::ortho(0.0F, static_cast<float>(g_WindowMan.GetResX()), 0.0F, static_cast<float>(g_WindowMan.GetResY()), -1.0F, 1.0F));

0 commit comments

Comments
 (0)