mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
VideoBackends: Scale bounding box rectangle in the pixel shader
This commit is contained in:
parent
20999db93c
commit
16294acd2a
5 changed files with 59 additions and 145 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue