- tell softpoly backend which hwrenderer shader is active and use that to decide which drawer to use

This commit is contained in:
Magnus Norddahl 2019-05-28 08:13:19 +02:00
commit 555beb58f0
5 changed files with 135 additions and 47 deletions

View file

@ -541,6 +541,13 @@ void PolyFrameBuffer::BeginFrame()
{
SetViewportRects(nullptr);
CheckCanvas();
swrenderer::R_InitFuzzTable(GetCanvas()->GetPitch());
static int next_random = 0;
swrenderer::fuzzpos = (swrenderer::fuzzpos + swrenderer::fuzz_random_x_offset[next_random] * FUZZTABLE / 100) % FUZZTABLE;
next_random++;
if (next_random == FUZZ_RANDOM_X_SIZE)
next_random = 0;
}
void PolyFrameBuffer::Draw2D()