cftvgybhu549
Please help me.
I want to use a camera to render a texture2D, which will be used in borderimage.
but this texture miss alpha information.
ps: the zone Color I set the fog color is Color(0,0,0,0) . but it’s no use.
Please help me.
I want to use a camera to render a texture2D, which will be used in borderimage.
but this texture miss alpha information.
ps: the zone Color I set the fog color is Color(0,0,0,0) . but it’s no use.
What renderpath do you use?
This worked fine for me:
<renderpath>
<rendertarget name="stub1" sizedivisor="1 1" format="rgba" />
<rendertarget name="stub2" sizedivisor="1 1" format="rgba" />
<rendertarget name="depth" sizedivisor="1 1" format="readabledepth" />
<command type="clear" color="0 0 0 0" depth="1.0" stencil="0" depthstencil="depth" />
<command type="scenepass" pass="deferred" marktostencil="true" vertexlights="true" metadata="gbuffer" depthstencil="depth">
<output index="0" name="viewport" />
<output index="1" name="stub1" />
<output index="2" name="stub2" />
</command>
</renderpath>
the pass I use is forward, what render path should I use. plz~
Probably something in Forward path breaks alpha channel after scene rendering.
You have to write your own renderpath that doesn’t break alpha (like I did before).
<renderpath>
<command type="clear" color="fog" depth="1.0" stencil="0" />
<command type="scenepass" pass="base" vertexlights="true" metadata="base" />
<command type="forwardlights" pass="light" />
<command type="scenepass" pass="postopaque" />
<command type="scenepass" pass="refract">
<texture unit="environment" name="viewport" />
</command>
<command type="scenepass" pass="alpha" vertexlights="true" sort="backtofront" metadata="alpha" />
<command type="scenepass" pass="postalpha" sort="backtofront" />
</renderpath>
I use the default forward render path. how should I do to modify it. I am not clear about render path, plz help.
sry, I make a mistake.
I didn’t use GetRGBAFormat(), I used GetRGBFormat()
Huh. Does it work now?
yes~ thank you guy~~