Fix pixel snap not being used in 3.0

This commit is contained in:
Guilherme Silva 2017-12-19 15:18:07 -02:00
parent a714e1a4c7
commit ffe827ab5a
2 changed files with 3 additions and 1 deletions

View file

@ -1784,6 +1784,8 @@ void RasterizerCanvasGLES3::initialize() {
state.canvas_shader.set_conditional(CanvasShaderGLES3::USE_RGBA_SHADOWS, storage->config.use_rgba_2d_shadows);
state.canvas_shadow_shader.set_conditional(CanvasShadowShaderGLES3::USE_RGBA_SHADOWS, storage->config.use_rgba_2d_shadows);
state.canvas_shader.set_conditional(CanvasShaderGLES3::USE_PIXEL_SNAP, GLOBAL_DEF("rendering/quality/2d/use_pixel_snap", false));
}
void RasterizerCanvasGLES3::finalize() {

View file

@ -171,7 +171,7 @@ VERTEX_SHADER_CODE
#ifdef USE_PIXEL_SNAP
outvec.xy=floor(outvec+0.5);
outvec.xy=floor(outvec+0.5).xy;
#endif