本文整理汇总了Python中PostProcessing.Effect.bypass方法的典型用法代码示例。如果您正苦于以下问题:Python Effect.bypass方法的具体用法?Python Effect.bypass怎么用?Python Effect.bypass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PostProcessing.Effect
的用法示例。
在下文中一共展示了Effect.bypass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: playerFader
# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import bypass [as 别名]
def playerFader():
"""This method creates and returns a post-process effect that fades
out the player when they get too close to the camera.
This effect only works in the client, as there is no player in the tools."""
backBufferCopy = rt('PostProcessing/backBufferCopy')
e = Effect()
e.name = 'Player Fader'
try:
from _PostProcessing import PlayerFader
p = PlayerFader()
except:
p = None
if p is not None:
c = buildBackBufferCopyPhase(backBufferCopy)
p.renderTarget = backBufferCopy
p.clearRenderTarget = False
p.name = 'Player Fader'
t = buildTransferPhase(backBufferCopy.texture, BW_BLEND_SRCALPHA, BW_BLEND_INVSRCALPHA)
t.material.alphaOverdrive = 255.0
t.material.alpha = p.opacity
t.material.alphaTestEnable = True
t.material.alphaReference = 1
e.bypass = p.opacity
e.phases = [c, p, t]
else:
e.phases = []
return e
示例2: shimmer
# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import bypass [as 别名]
def shimmer():
"""This method creates and returns a post-process effect that emulates
heat shimmer. It uses the mask created by shimmer objects (those that
use the shimmer channel, and output alpha)."""
backBufferCopy = rt('PostProcessing/backBufferCopy')
e = Effect()
c = pre = buildBackBufferCopyPhase(backBufferCopy)
p = buildPhase(backBufferCopy.texture, None, 'shaders/post_processing/heat_shimmer.fx')
p.name = 'heat shimmer'
p.filterQuad = VisualTransferMesh('system/models/fx_shimmer_transfer.visual')
e.phases = [c, p]
e.name = 'Heat Shimmer'
e.bypass = Math.Vector4Combiner()
e.bypass.a = Math.Vector4(0, 0, 0, 0)
e.bypass.b = BigWorld.PyShimmerCountProvider()
return e
示例3: registrationTest
# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import bypass [as 别名]
def registrationTest():
"""This method creates and returns an effect that tests
whether or not the transfer registration is correct. It
copies the back buffer and transfers it back over itself
a few times in order to see if any pixels are shifted. In
theory this should produce no visual effect at all"""
c = buildBackBufferCopyPhase(backBufferCopy)
t = buildTransferPhase(backBufferCopy.texture)
e = Effect()
e.name = 'Test Registration'
phases = [c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t,
c,
t]
e.phases = phases
import Math
e.bypass = Math.Vector4LFO()
e.bypass.period = 2.0
e.bypass.waveform = 'SQUARE'
return e