[wip, win32, canvas] winding backprop and right crossing segments

This commit is contained in:
martinfouilleul 2023-06-30 15:30:05 +02:00
parent 0870097262
commit f0b7cf32a9
2 changed files with 5 additions and 7 deletions

View File

@ -269,11 +269,10 @@ void mg_gl_render_batch(mg_gl_canvas_backend* backend,
glUniform2i(2, nTilesX, nTilesY); glUniform2i(2, nTilesX, nTilesY);
glDispatchCompute(eltCount, 1, 1); glDispatchCompute(eltCount, 1, 1);
glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT); glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
//NOTE: backprop pass //NOTE: backprop pass
/*
glUseProgram(backend->backprop); glUseProgram(backend->backprop);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, backend->tileQueueBuffer); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, backend->tileQueueBuffer);
@ -281,7 +280,8 @@ void mg_gl_render_batch(mg_gl_canvas_backend* backend,
glUniform2i(0, nTilesX, nTilesY); glUniform2i(0, nTilesX, nTilesY);
glDispatchCompute(nTilesY, 1, 1); glDispatchCompute(nTilesY, 1, 1);
*/ glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
/* /*
//NOTE: merge pass //NOTE: merge pass
glUseProgram(backend->merge); glUseProgram(backend->merge);

View File

@ -144,8 +144,7 @@ void main()
mg_gl_tile_queue tileQueue = tileQueuesBuffer.elements[tileIndex]; mg_gl_tile_queue tileQueue = tileQueuesBuffer.elements[tileIndex];
int opIndex = tileQueue.first; int opIndex = tileQueue.first;
// int winding = tileQueue.windingOffset; int winding = tileQueue.windingOffset;
int winding = 0;
if((pixelCoord.x % 16) == 0 || (pixelCoord.y % 16) == 0) if((pixelCoord.x % 16) == 0 || (pixelCoord.y % 16) == 0)
{ {
@ -174,7 +173,7 @@ void main()
winding += seg.windingIncrement; winding += seg.windingIncrement;
} }
/* if(op.crossRight) if(op.crossRight)
{ {
if( (seg.config == MG_GL_BR || seg.config == MG_GL_TL) if( (seg.config == MG_GL_BR || seg.config == MG_GL_TL)
&&(sampleCoord.y > seg.box.w)) &&(sampleCoord.y > seg.box.w))
@ -187,7 +186,6 @@ void main()
winding -= seg.windingIncrement; winding -= seg.windingIncrement;
} }
} }
*/
} }
} }
int pathIndex = 0; int pathIndex = 0;