Garry's Mod Wiki

render.OverrideAlphaWriteEnable

void render.OverrideAlphaWriteEnable( boolean enable, boolean shouldWrite )

Description

Overrides the write behaviour of all next rendering operations towards the alpha channel of the current render target.

See also render.OverrideBlend.

Doing surface draw calls with alpha set to 0 is a no-op and will never have any effect.

Arguments

1 boolean enable
Enable or disable the override.
2 boolean shouldWrite
If the previous argument is true, sets whether the next rendering operations should write to the alpha channel or not. Has no effect if the previous argument is false.

Example

Shows how you can use alpha channel with render targets.

render.PushRenderTarget( texture ) render.OverrideAlphaWriteEnable( true, true ) render.ClearDepth() render.Clear( 0, 0, 0, 0 ) render.OverrideAlphaWriteEnable( false ) render.PopRenderTarget()

Page Links


Special Pages


Wikis

?

Render Time: 22ms

Session 0
DB GetPage 3
Generate Html 1
SaveChanges 9
Render Body 0
Render Sidebar 6