render.OverrideAlphaWriteEnable

From Garry's Mod
Jump to: navigation, search
 render.OverrideAlphaWriteEnable( )

Contents

Description

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

See also render.OverrideBlendFunc.

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

Arguments

boolean enable

Enable or disable the override.

Arguments

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.

Examples

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()


Personal tools
Navigation