Unity-Technologies / GenericFrameRecorder

This GitHub package is DEPRECATED. Please get the new Unity Recorder from the Asset Store (https://assetstore.unity.com/packages/essentials/unity-recorder-94079) Use the editor builtin Bug Reporter to report issues. You can track and vote for issues on the Issue Tracker (https://issuetracker.unity3d.com)
MIT License
535 stars 66 forks source link

Command Buffered Camera hardcodes full opacity. #8

Closed Dominique-Unity closed 7 years ago

Dominique-Unity commented 7 years ago

This line in the CommandFrameBufer shader causes the captured image's alpha to be ignored and replaced by full opacity:

https://github.com/Unity-Technologies/GenericFrameRecorder/blob/master/source/FrameRecorder/Inputs/CBRenderTexture/Shaders/CopyFrameBuffer.shader#L53

When the Camera used for recording has its Clear Flags set to "Solid Color", the Background color's alpha component can be set by the user and ends up in the rendered image. But the shader overwrites this color (possibly to overcome the fact that the default alpha value of this color is 0=fully transparent?).

Commenting-out this line in the shader causes recording with alpha to work as expected.

jasonm-unity commented 7 years ago

added UI option to preserve transparency.