mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoBackends: Scale bounding box rectangle in the pixel shader
This commit is contained in:
@ -1250,24 +1250,9 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||
|
||||
if (bounding_box)
|
||||
{
|
||||
out.Write(" if (bpmem_bounding_box) {\n");
|
||||
if (ApiType == APIType::D3D)
|
||||
{
|
||||
out.Write(
|
||||
" if(bbox_data[0] > int(rawpos.x)) InterlockedMin(bbox_data[0], int(rawpos.x));\n"
|
||||
" if(bbox_data[1] < int(rawpos.x)) InterlockedMax(bbox_data[1], int(rawpos.x));\n"
|
||||
" if(bbox_data[2] > int(rawpos.y)) InterlockedMin(bbox_data[2], int(rawpos.y));\n"
|
||||
" if(bbox_data[3] < int(rawpos.y)) InterlockedMax(bbox_data[3], int(rawpos.y));\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
out.Write("\tif(bbox_left > int(rawpos.x)) atomicMin(bbox_left, int(rawpos.x));\n"
|
||||
"\tif(bbox_right < int(rawpos.x)) atomicMax(bbox_right, int(rawpos.x));\n"
|
||||
"\tif(bbox_top > int(rawpos.y)) atomicMin(bbox_top, int(rawpos.y));\n"
|
||||
"\tif(bbox_bottom < int(rawpos.y)) atomicMax(bbox_bottom, int(rawpos.y));\n");
|
||||
}
|
||||
|
||||
out.Write(" }\n");
|
||||
out.Write(" if (bpmem_bounding_box) {\n"
|
||||
" UpdateBoundingBox(rawpos.xy);\n"
|
||||
" }\n");
|
||||
}
|
||||
|
||||
if (use_shader_blend)
|
||||
|
Reference in New Issue
Block a user