Fix wrong Cycles tile highlight with region render
In previous Blender version the tile highlight was stored in the full frame (un-cropped) space. This was changed with the Cycles X development and now the tiles and render result are always measured relative to the cropped region. Differential Revision: https://developer.blender.org/D12779
This commit is contained in:
parent
7afde7cd22
commit
596446dbc6
|
@ -112,13 +112,6 @@ static void draw_render_info(
|
|||
GPU_matrix_translate_2f(x, y);
|
||||
GPU_matrix_scale_2f(zoomx, zoomy);
|
||||
|
||||
RenderData *rd = RE_engine_get_render_data(re);
|
||||
if (rd->mode & R_BORDER) {
|
||||
/* TODO: round or floor instead of casting to int */
|
||||
GPU_matrix_translate_2f((int)(-rd->border.xmin * rd->xsch * rd->size * 0.01f),
|
||||
(int)(-rd->border.ymin * rd->ysch * rd->size * 0.01f));
|
||||
}
|
||||
|
||||
uint pos = GPU_vertformat_attr_add(
|
||||
immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
|
||||
|
|
|
@ -281,11 +281,10 @@ static void render_result_to_bake(RenderEngine *engine, RenderResult *rr)
|
|||
|
||||
/* Render Results */
|
||||
|
||||
static HighlightedTile highlighted_tile_from_result_get(Render *re, RenderResult *result)
|
||||
static HighlightedTile highlighted_tile_from_result_get(Render *UNUSED(re), RenderResult *result)
|
||||
{
|
||||
HighlightedTile tile;
|
||||
tile.rect = result->tilerect;
|
||||
BLI_rcti_translate(&tile.rect, re->disprect.xmin, re->disprect.ymin);
|
||||
|
||||
return tile;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue