Rendering a RenderTarget to another rendertarget over time to create smooth transition.

I am trying to follow a tip in a breakdown of a fog of war effect found in this link.

Here the person is rendering a render target to a new render target using Draw Canvas to render target and Draw texture with delta seconds hooked up to the Alpha.

But I can’t for the life of me get it to do anything when it’s set to translucent.

My setup is slightly different as I am rendering my original canvas render target with ‘draw material to render target’ before the ‘Begin draw canvas render target’, but no matter what I try I can’t get it to render progressively over time. It does however work with additive.

I thought maybe it was something wrong with how Draw material to render target is drawing to the alpha channel, but I can’t for the life of me work out why it would even matter. The alpha of the texture shouldnt really have anything to do with it, as its being controlled in Draw Texture.

I’d really appreciate any help if anyone knows anything :confused:

Thanks

If i understand correctly as the user walk ,the whole fog get transparent progressively or only where the user is moving(like a sphere mask) ?

It might be easier to do it via a material and change the parameter float of the opacity.

Thanks for replying.

I actually got this working by turning my render material to post process with alpha instead of unlit, and using my black and white FOW texture as a mask for a lerp with very low values. and stuck that into the opacity channel.
Now everytime it updates it overlays it with a low transparent version of itself creating the smooth transition over time.

1 Like