mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Apply offset to bilinearly filtered texture
This commit is contained in:
parent
0f0a010939
commit
5dd521c8fd
1 changed files with 1 additions and 0 deletions
|
@ -229,6 +229,7 @@ Framework::OpenGl::CShader CGSH_OpenGL::GenerateFragmentShader(const SHADERCAPS&
|
|||
}
|
||||
else
|
||||
{
|
||||
shaderBuilder << " texCoord.st -= g_texelSize.st * 0.5;" << std::endl;
|
||||
shaderBuilder << " float tlIdx = texture(g_texture, texCoord.st ).r * 255.0;" << std::endl;
|
||||
shaderBuilder << " float trIdx = texture(g_texture, texCoord.st + vec2(g_texelSize.x, 0) ).r * 255.0;" << std::endl;
|
||||
shaderBuilder << " float blIdx = texture(g_texture, texCoord.st + vec2(0, g_texelSize.y) ).r * 255.0;" << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue