tried to fix some half-pixel bugs

This commit is contained in:
aap 2020-04-26 21:50:52 +02:00
parent c076998ba3
commit 1b5616688e
3 changed files with 23 additions and 16 deletions

View file

@ -58,13 +58,13 @@ CMBlur::CreateImmediateModeData(RwCamera *cam, RwRect *rect)
float zero, xmax, ymax;
if(RwRasterGetDepth(RwCameraGetRaster(cam)) == 16){
zero = 0.5f;
xmax = rect->w + 0.5f;
ymax = rect->h + 0.5f;
zero = HALFPX;
xmax = rect->w + HALFPX;
ymax = rect->h + HALFPX;
}else{
zero = -0.5f;
xmax = rect->w - 0.5f;
ymax = rect->h - 0.5f;
zero = -HALFPX;
xmax = rect->w - HALFPX;
ymax = rect->h - HALFPX;
}
RwIm2DVertexSetScreenX(&Vertex[0], zero);