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
221 stars 47 forks source link

Getting RGB values from frame buffer #67

Closed WannaBeKratos closed 1 year ago

WannaBeKratos commented 1 year ago

Is there a way to get RGBA values from frame buffer ? The closes' thing I found to it is under the ocio tutorial. Any further insight for me ? Another question, how is a preview in software like Blender and Maya achieved, am I supposed to use one of the interop headers like RadeonProRender_VK ?

bsavery commented 1 year ago

You can cast a resolved framebuffer to a float array. Or rprFrameBufferSaveToFile.

Blender works basically by casting the framebuffer to a float array and then copying up to OpenGL

WannaBeKratos commented 1 year ago

One more question. The values returned (float array) are not actual pixel values, those are stored somewhere also, correct ? I am getting some values from the framebuffer, but when I save the data as an image, I get a different image from rprFrameBufferSaveToFile. I believe what I'm looking for is more of a Render Buffer.

WannaBeKratos commented 1 year ago

I manage to solve the issue, I had to do a little conversion of the frame buffer. Closing