mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-13 01:41:48 +08:00
Performance optimization for SLA rasterization step
Do not use a gamma function (a pow call for every pixel) if exponent is near 1.0
This commit is contained in:
parent
86657523e3
commit
ac6611e374
@ -77,6 +77,8 @@ std::unique_ptr<RasterBase> create_raster_grayscale_aa(
|
||||
|
||||
if (gamma > 0)
|
||||
rst = std::make_unique<RasterGrayscaleAAGammaPower>(res, pxdim, tr, gamma);
|
||||
else if (std::abs(gamma - 1.) < 1e-6)
|
||||
rst = std::make_unique<RasterGrayscaleAA>(res, pxdim, tr, agg::gamma_none());
|
||||
else
|
||||
rst = std::make_unique<RasterGrayscaleAA>(res, pxdim, tr, agg::gamma_threshold(.5));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user