当前位置: 首页>>代码示例>>Python>>正文


Python Effect.bypass方法代码示例

本文整理汇总了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
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:30,代码来源:playerfader.py

示例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
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:18,代码来源:shimmer.py

示例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
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:74,代码来源:registrationtest.py


注:本文中的PostProcessing.Effect.bypass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。