GPUOpen-LibrariesAndSDKs / RadeonProRenderSDK

AMD Radeon™ ProRender is a powerful physically-based path traced rendering engine that enables creative professionals to produce stunningly photorealistic images.
https://gpuopen.com/radeon-prorender-suite/
Other
223 stars 47 forks source link

Depth AOV generate empty image #6

Closed marceloroca closed 4 years ago

marceloroca commented 4 years ago

Wen generate RPR_AOV_DEPTH the result image is empty.

I'm using the tutorial 33_aov, with this changes:

// before render rpr_framebuffer frame_buffer_depth, frame_buffer_depth2; CHECK(rprContextCreateFrameBuffer(context, fmt, &desc, &frame_buffer_depth)); CHECK(rprContextCreateFrameBuffer(context, fmt, &desc, &frame_buffer_depth2)); CHECK(rprFrameBufferClear(frame_buffer_depth)); CHECK(rprFrameBufferClear(frame_buffer_depth2)); CHECK(rprContextSetAOV(context, RPR_AOV_DEPTH, frame_buffer_depth));

// after render CHECK(rprContextResolveFrameBuffer(context, frame_buffer_depth, frame_buffer_depth2, true)); CHECK(rprFrameBufferSaveToFile(frame_buffer_depth2, "33_depth.png"));

OS: Windows 10 GPU: Radeon RX 5500 XT Driver: 20.5.1

33_depth

bsavery commented 4 years ago

Are you looking at the image in an editor? Keep in mind the Z values might not be normalized to 0-1

marceloroca commented 4 years ago

Yes I'm looking image with photoshop. But If I use the generated depth image with RPR_AOV_DEPTH with the RIF_IMAGE_FILTER_DEPTH_OF_FIELD filter, the depth of field effect is not applied.

Attached is a Radeon Image Filter that apply the RIF_IMAGE_FILTER_DEPTH_OF_FIELD filter and color/depth images, the depth image was generated with RPR

DOF.zip

marceloroca commented 4 years ago

I check the image min and max values with FrameBufferGetInfo RPR_FRAMEBUFFER_DATA and the values are:

min: 1 max: 10000

Maybe the problem is with RadeonImageFilters

marceloroca commented 4 years ago

thank you, was solved in https://github.com/GPUOpen-LibrariesAndSDKs/RadeonImageFilter/issues