Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17093

RenderTexture Transparent after transparent ColorLayer visit

$
0
0

@0mega wrote:

Hi everyone,

We're trying to render a RenderTexture which visits a few sprites and a semi transparent LayerColor node.

The structure is roughly like this:

renderTexture->begin();
background->visit(); //GREEN BACKGROUND FULLY OPAQUE
layercolor->visit(); //BLACK LAYERCOLOR(0,0,0,55) NODE
renderTexture->end();

The layercolor node is initialized with 55 transparency.
If I do NOT visit the layercolor the rendertexture will be fully opaque green.
If I visit the layercolor the rendertexture will be partially transparent, as if the rendertexture 'inherits' the transparency of the layercolor node.

Is there a way to prevent this? I am using the layercolor to 'darken' the background and I do not want the opacity level of the layercolor to apply to the entire 'final' image inside the renderTexture.

Thanks in advance.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17093

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>