SmartFX SDK - Get pixel data outside of the effect rectangle
I am attempting to expand the pixel data outside the default bounding rectangle. I am not rendering beyond the bounding box ( ala a drop shadow ), but I need more of the surrounding pixels for my effect which samples a large radius.
I think that I need to expand the request one of the PF_LRects in the SmartFX PreRender. But I am not having any luck.
Any tips on how to do this?
Thank you
static PF_Err
PreRender(
PF_InData* in_data,
PF_OutData* out_data,
PF_PreRenderExtra* extra)
{
PF_Err err = PF_Err_NONE;
PF_RenderRequest req = extra->input->output_request;
// ATTEMPT TO EXTEND THE BOUNDNIG BOX OF AVAILABLE PIXEL DATA
// BY 1000
// I WILL NOT BE RENDERING OUTSIDE OF THE BOUDINGBOX
// BUT I WANT TO SAMPLE OUTSIDE OF IT
req.rect.bottom += 1000;
req.rect.top -= 1000;
req.rect.left -= 1000;
req.rect.right += 1000;
PF_CheckoutResult in_result;
AEGP_SuiteHandler suites(in_data->pica_basicP);
PF_Handle infoH = suites.HandleSuite1()->host_new_handle(sizeof(testSampleInfo));
if (infoH) {
testSampleInfo* infoP = reinterpret_cast<testSampleInfo*>(suites.HandleSuite1()->host_lock_handle(infoH));
if (infoP) {
ERR(extra->cb->checkout_layer(in_data->effect_ref,
TESTSAMPLE_INPUT,
TESTSAMPLE_INPUT,
&req,
in_data->current_time,
in_data->time_step,
in_data->time_scale,
&in_result));
UnionLRect(&in_result.result_rect, &extra->output->result_rect);
UnionLRect(&in_result.max_result_rect, &extra->output->max_result_rect);
}
}
return err;
}
