Radeon ProRender


Sets the subdivision factor depending on the camera position and framebuffer size.

You can retrieve the internally computed factor with rprShapeGetInfo (…, RPR_SHAPE_SUBDIVISION_FACTOR, …).

You should call this function each time you want to re-adapt the subdivision factor: internally, the factor will NOT be automatically re-computed when the camera, shape or framebuffer changes.

rpr_status rprShapeAutoAdaptSubdivisionFactor( rpr_shape shape,
  rpr_framebuffer framebuffer,
  rpr_camera camera,
  rpr_int factor);


Parameter Description
shape The shape to set subdivision for.
framebuffer The framebuffer used for factor adaptation.
camera The camera used for factor adaptation.
factor The factor to regulate the intensity of adaptation. See Notes.


Adaptive subdivision is calculated by the object’s size on the camera in pixels and the factor set. A factor of 0 gives 4 faces per pixel, while values above/below 0 give more/less subdivision, as seen from the formula: subdivision size in pixel = 2^factor/16.0.


Returns RPR_SUCCESS in case of success, or RPR_ERROR code if a problem was encountered.

To learn how to handle errors in AMD Radeon ProRender SDK, see Error Handling.