Merge pull request #14834 from guilhermefelipecgs/fix_pixel_snap
Fix pixel snap not being used in 3.0
This commit is contained in:
commit
0a6a0086d8
@ -1784,6 +1784,8 @@ void RasterizerCanvasGLES3::initialize() {
|
|||||||
|
|
||||||
state.canvas_shader.set_conditional(CanvasShaderGLES3::USE_RGBA_SHADOWS, storage->config.use_rgba_2d_shadows);
|
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_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() {
|
void RasterizerCanvasGLES3::finalize() {
|
||||||
|
@ -171,7 +171,7 @@ VERTEX_SHADER_CODE
|
|||||||
|
|
||||||
#ifdef USE_PIXEL_SNAP
|
#ifdef USE_PIXEL_SNAP
|
||||||
|
|
||||||
outvec.xy=floor(outvec+0.5);
|
outvec.xy=floor(outvec+0.5).xy;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user