mirror of
https://github.com/scummvm/scummvm.git
synced 2025-04-02 10:52:32 -04:00
MYST3: Explain the texture size workaround used in the ES2 renderer
This commit is contained in:
parent
2d37561276
commit
61968c6341
1 changed files with 8 additions and 0 deletions
|
@ -347,6 +347,14 @@ void ShaderRenderer::drawCube(Texture **textures) {
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
glDepthMask(GL_FALSE);
|
glDepthMask(GL_FALSE);
|
||||||
|
|
||||||
|
// WORKAROUND: The texture scale is set to a slightly incorrect value below,
|
||||||
|
// (the "texture0->width - 1" part should be just "texture0->width"), in order
|
||||||
|
// to work around a white line appearing along the edges of the cube due
|
||||||
|
// enabling linear filtering on partially used textures, resulting in the
|
||||||
|
// unused part leaking into the used part.
|
||||||
|
// FIXME: This causes a very subtle misalignment between the videos blended
|
||||||
|
// into the scenes and the background.
|
||||||
|
|
||||||
_cube_shader->use();
|
_cube_shader->use();
|
||||||
_cube_shader->setUniform1f("verScale", 256.0f);
|
_cube_shader->setUniform1f("verScale", 256.0f);
|
||||||
_cube_shader->setUniform1f("texScale", (texture0->width - 1) / (float) texture0->internalWidth);
|
_cube_shader->setUniform1f("texScale", (texture0->width - 1) / (float) texture0->internalWidth);
|
||||||
|
|
Loading…
Add table
Reference in a new issue