diff options
Diffstat (limited to 'libs/hwui/Dither.cpp')
-rwxr-xr-x | libs/hwui/Dither.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/Dither.cpp b/libs/hwui/Dither.cpp index 5817977..e80b325 100755 --- a/libs/hwui/Dither.cpp +++ b/libs/hwui/Dither.cpp @@ -76,8 +76,10 @@ void Dither::setupProgram(Program* program, GLuint* textureUnit) { bindDitherTexture(); + float ditherSize = 1.0f / DITHER_KERNEL_SIZE; glUniform1i(program->getUniform("ditherSampler"), textureSlot); - glUniform1f(program->getUniform("ditherSize"), 1.0f / DITHER_KERNEL_SIZE); + glUniform1f(program->getUniform("ditherSize"), ditherSize); + glUniform1f(program->getUniform("ditherSizeSquared"), ditherSize * ditherSize); } }; // namespace uirenderer |