-
|
I ran into another question which hopefully is just a matter of my ignorance. How can I return the float32 value for the colours calculated in the fragment shader as an array? For example, how should I modify the Offscreen Rendering example so that the im1 array is float32 instead of int8? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
After some more looking around I found a solution in the discussion in #318. For future reference, here is a modified version of the |
Beta Was this translation helpful? Give feedback.
-
|
At the moment the render targets are uint8 rgba. We could make it easier (i.e. via a public API) to render to float textures. This relates to post-processing, which is something we need to design API for, so until then, your proposed workaround (overriding |
Beta Was this translation helpful? Give feedback.
After some more looking around I found a solution in the discussion in #318. For future reference, here is a modified version of the
offscreen.pyexample which extracts the rendered image as float32. Since the solution thread is quite old, let me know if there is a nicer way to achieve this (e.g. rendering into a Texture?).