Tweeted twitter.com/StackGameDev/status/1048135975019405313
2 better image
source | link

I'm writing a 3D game using Unity 2017.1.0b1. I have a disabled Camera that takes a "snapshot" of the current scene and stores it in a RenderTexture when a button is clicked. I then display the RenderTexture in a RawImage within my scene.

This works, except that the output from the Camera into the RenderTexture doesn't take into account the alpha value of the Camera's clear color.

Here's a snapshot of how my disabled Camera is configured. Notice the Background property has an alpha value of 0:

My disabled Camera's configuration in UnityMy disabled Camera's configuration in Unity

Here's a snapshot of what the RenderTexture (displayed using a RawImage) looks like in the game. The blue square is the RenderTexture:

The game view with the non-transparent RenderTexture

How can I make the Camera render into the RenderTexture with a transparent background? I didn't expect the blue background to show up in the RenderTexture since its alpha value is 0.

I'm writing a 3D game using Unity 2017.1.0b1. I have a disabled Camera that takes a "snapshot" of the current scene and stores it in a RenderTexture when a button is clicked. I then display the RenderTexture in a RawImage within my scene.

This works, except that the output from the Camera into the RenderTexture doesn't take into account the alpha value of the Camera's clear color.

Here's a snapshot of how my disabled Camera is configured. Notice the Background property has an alpha value of 0:

My disabled Camera's configuration in Unity

Here's a snapshot of what the RenderTexture (displayed using a RawImage) looks like in the game. The blue square is the RenderTexture:

The game view with the non-transparent RenderTexture

How can I make the Camera render into the RenderTexture with a transparent background? I didn't expect the blue background to show up in the RenderTexture since its alpha value is 0.

I'm writing a 3D game using Unity 2017.1.0b1. I have a disabled Camera that takes a "snapshot" of the current scene and stores it in a RenderTexture when a button is clicked. I then display the RenderTexture in a RawImage within my scene.

This works, except that the output from the Camera into the RenderTexture doesn't take into account the alpha value of the Camera's clear color.

Here's a snapshot of how my disabled Camera is configured. Notice the Background property has an alpha value of 0:

My disabled Camera's configuration in Unity

Here's a snapshot of what the RenderTexture (displayed using a RawImage) looks like in the game. The blue square is the RenderTexture:

The game view with the non-transparent RenderTexture

How can I make the Camera render into the RenderTexture with a transparent background? I didn't expect the blue background to show up in the RenderTexture since its alpha value is 0.

1
source | link

How can I make my Camera's RenderTexture output have a transparent background?

I'm writing a 3D game using Unity 2017.1.0b1. I have a disabled Camera that takes a "snapshot" of the current scene and stores it in a RenderTexture when a button is clicked. I then display the RenderTexture in a RawImage within my scene.

This works, except that the output from the Camera into the RenderTexture doesn't take into account the alpha value of the Camera's clear color.

Here's a snapshot of how my disabled Camera is configured. Notice the Background property has an alpha value of 0:

My disabled Camera's configuration in Unity

Here's a snapshot of what the RenderTexture (displayed using a RawImage) looks like in the game. The blue square is the RenderTexture:

The game view with the non-transparent RenderTexture

How can I make the Camera render into the RenderTexture with a transparent background? I didn't expect the blue background to show up in the RenderTexture since its alpha value is 0.