Unity-Technologies / UniversalRenderingExamples

This project contains a collection of Custom Renderer examples. This will be updated as we refine the feature and add more options.
2.04k stars 411 forks source link

Blit/ScreenQuad source/destination size resolutions? #9

Closed amartinez1660 closed 4 years ago

amartinez1660 commented 4 years ago

Is there a way to get the source and/or destination render target sizes? During the Execute method 'context' and 'renderingData' doesn't seem to contain anything regarding that. If I wanted to use these render feature pipeline to create a downsampled/blurred targets, how can I go about it? is there a way to get render target sizes via their RenderTargetIdentifier ids?

The task at hand is very basic -> GetTemporaryRenderTarget(id, srcWidth / 2, srcHeight / 2);

Thanks in advance.

Edit: My bad, the source resolution is on the cameraData's cameraRenderDescriptor, however, chaining one blit after another might not work as there's no way to know what's the latest render target id freshly downsampled resolution. Workarounds might be possible by binding the info of one to the other.