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


Python Effect.name方法代码示例

本文整理汇总了Python中PostProcessing.Effect.name方法的典型用法代码示例。如果您正苦于以下问题:Python Effect.name方法的具体用法?Python Effect.name怎么用?Python Effect.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PostProcessing.Effect的用法示例。


在下文中一共展示了Effect.name方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: blur

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def blur(filterMode = 0, attenuation = (1, 1, 1, 1), numPasses = 1, width = 1.0):
    """This method creates and returns a blur post-process effect.  It assumes
    the scene has been captured and downsampled into the downSample3 render target."""
    downSample3 = rt('PostProcessing/downSample3')
    computeBuffer1 = rt('PostProcessing/computeBuffer1')
    computeBuffer2 = rt('PostProcessing/computeBuffer2')
    phases = []
    if numPasses > 0:
        bh = buildBlurPhase(downSample3.texture, computeBuffer1, True, filterMode, width)
        bh.material.attenuation = attenuation
        bv = buildBlurPhase(computeBuffer1.texture, computeBuffer2, False, filterMode, width)
        phases.append(bh)
        phases.append(bv)
    if numPasses > 1:
        bh = buildBlurPhase(computeBuffer2.texture, computeBuffer1, True, filterMode, width)
        bh.material.attenuation = attenuation
        bv = buildBlurPhase(computeBuffer1.texture, computeBuffer2, False, filterMode, width)
        for n in xrange(1, numPasses):
            phases.append(bh)
            phases.append(bv)

    t = buildTransferPhase(computeBuffer2.texture, BW_BLEND_SRCALPHA, BW_BLEND_ZERO)
    phases.append(t)
    e = Effect()
    e.name = 'Blur'
    e.phases = phases
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:29,代码来源:bloom.py

示例2: posteriseAndEdge

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def posteriseAndEdge():
    """This method creates and returns a post-process effect that posterises
    the back buffer and draws black edges.  It does this by using a Kuwahara
    filter, which is a noise-reduction filter that preserves edges. It then
    performs edge detection and dilation and blends the results back over the
    posterised back buffer."""
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    backBufferCopyB = rt('PostProcessing/backBufferCopyB')
    downSample1 = rt('PostProcessing/downSample1')
    downSample1B = rt('PostProcessing/downSample1B')
    c = buildBackBufferCopyPhase(backBufferCopy)
    c2 = buildBackBufferCopyPhase(backBufferCopyB)
    d0 = buildDownSamplePhase(backBufferCopy.texture, downSample1)
    computeMeanVariance = buildMeanVariancePhase(downSample1.texture, downSample1B)
    selectVariance = buildVarianceSelectPhase(downSample1B.texture, None)
    s = build9TapFilterPhase(backBufferCopyB.texture, backBufferCopy, edgeDetectFilter)
    d = buildEdgeDilationPhase(backBufferCopy.texture, backBufferCopyB)
    t = buildTransferPhase(backBufferCopyB.texture, BW_BLEND_ZERO, BW_BLEND_SRCCOLOR)
    e = Effect()
    e.name = 'Posterise and Edge'
    e.phases = [c,
     c2,
     d0,
     computeMeanVariance,
     selectVariance,
     s,
     d,
     t]
    return e
开发者ID:aevitas,项目名称:wotsdk,代码行数:31,代码来源:effectsposterise.py

示例3: playerFader

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [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

示例4: multiBlur

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def multiBlur(filterMode = 0):
    """This method creates and returns an effect that down-samples and
    blurs the back-buffer.  *It relies on the down sample buffers already
    having been created*.  It fills the     downSampleBlur1/2/3 render targets."""
    downSample1 = rt('PostProcessing/downSample1')
    downSample1B = rt('PostProcessing/downSample1B')
    downSample2B = rt('PostProcessing/downSample2B')
    downSample3B = rt('PostProcessing/downSample3B')
    downSampleBlur1 = rt('PostProcessing/downSampleBlur1')
    downSampleBlur2 = rt('PostProcessing/downSampleBlur2')
    downSampleBlur3 = rt('PostProcessing/downSampleBlur3')
    bh1 = buildBlurPhase(downSample1.texture, downSample1B, True, filterMode, 1.0)
    bv1 = buildBlurPhase(downSample1B.texture, downSampleBlur1, False, filterMode, 1.0)
    bh2 = buildBlurPhase(downSampleBlur1.texture, downSample2B, True, filterMode, 1.0)
    bv2 = buildBlurPhase(downSample2B.texture, downSampleBlur2, False, filterMode, 1.0)
    bh2a = buildBlurPhase(downSampleBlur2.texture, downSample2B, True, filterMode, 1.0)
    bv2a = buildBlurPhase(downSample2B.texture, downSampleBlur2, False, filterMode, 1.0)
    bh3 = buildBlurPhase(downSampleBlur2.texture, downSample3B, True, filterMode, 1.0)
    bv3 = buildBlurPhase(downSample3B.texture, downSampleBlur3, False, filterMode, 1.0)
    bh3a = buildBlurPhase(downSampleBlur3.texture, downSample3B, True, filterMode, 1.0)
    bv3a = buildBlurPhase(downSample3B.texture, downSampleBlur3, False, filterMode, 1.0)
    e = Effect()
    e.name = 'Multi Blur'
    phases = [bh1,
     bv1,
     bh2,
     bv2,
     bh3,
     bv3,
     bh3a,
     bv3a]
    e.phases = phases
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:35,代码来源:multiblur.py

示例5: sharpen

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def sharpen():
    """This method creates and returns a post-process effect that sharpens
    the back buffer.  It does this by using a generic sharpening filter kernel.
    """
    backBufferCopy = rt("PostProcessing/backBufferCopy")
    c = buildBackBufferCopyPhase(backBufferCopy)
    s = build9TapFilterPhase(backBufferCopy.texture, None, sharpFilter)
    e = Effect()
    e.name = "Sharpen"
    e.phases = [c, s]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:13,代码来源:sharpen.py

示例6: colourCorrectHSV

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def colourCorrectHSV():
    """This method creates and returns a post-process effect that performs
    hsv colour correction, or tone mapping, based on the colour_correct_hsv.fx effect.
    """
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    e = Effect()
    e.name = _hsvColourCorrectEffectName
    c = buildBackBufferCopyPhase(backBufferCopy)
    p = buildHSVColourCorrectionPhase(backBufferCopy.texture, None)
    e.phases = [c, p]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:13,代码来源:colourcorrect.py

示例7: colourCorrect

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def colourCorrect(texName = 'system/maps/post_processing/colour_correct.dds'):
    """This method creates and returns a post-process effect that performs
    colour correction, or tone mapping, based on the colour_correct.fx effect.
    """
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    e = Effect()
    e.name = _colourCorrectEffectName
    c = buildBackBufferCopyPhase(backBufferCopy)
    p = buildColourCorrectionPhase(backBufferCopy.texture, texName, None)
    e.phases = [c, p]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:13,代码来源:colourcorrect.py

示例8: depthOfFieldVariableCoC

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def depthOfFieldVariableCoC():
    """This method creates and returns a post-process effect that performs
    depth-of-field, using a variable-sized convolution kernel.
    """
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    fpComputeBuffer1 = rt('PostProcessing/fpComputeBuffer1')
    c = buildBackBufferCopyPhase(backBufferCopy)
    t = buildDOFVariableCoCPhase(backBufferCopy.texture, fpComputeBuffer1.texture, None, stochasticSample)
    e = Effect()
    e.name = 'Depth of Field (variable filter)'
    e.phases = [c, t]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:14,代码来源:depthoffield.py

示例9: FXAA

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def FXAA():
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    c = buildBackBufferCopyPhase(backBufferCopy)
    lum = buildPhase(backBufferCopy.texture, None, 'shaders/anti_aliasing/fxaa_worldeditor_integration_luminance.fx', straightTransfer4Tap, BW_BLEND_ONE, BW_BLEND_ZERO)
    lum.name = 'luminance'
    lum.renderTarget = backBufferCopy
    r = buildPhase(backBufferCopy.texture, None, 'shaders/anti_aliasing/fxaa_worldeditor_integration.fx', straightTransfer4Tap, BW_BLEND_ONE, BW_BLEND_ZERO)
    r.name = 'transfer'
    e = Effect()
    e.name = 'FXAA'
    e.phases = [c, lum, r]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:14,代码来源:fxaa.py

示例10: edgeDetect

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def edgeDetect():
    """This method creates and returns a post-process effect that performs
    edge detection and dilation of the resultant edges."""
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    c = buildBackBufferCopyPhase(backBufferCopy)
    s = build9TapFilterPhase(backBufferCopy.texture, None, edgeDetectFilter)
    d = buildEdgeDilationPhase(backBufferCopy.texture, None)
    e = Effect()
    e.name = 'Edge Detect'
    e.phases = [c,
     s,
     c,
     d]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:16,代码来源:edgedetect.py

示例11: distortionTransfer

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def distortionTransfer(distortionTexture):
    """This method creates and returns a post-process effect that redraws
    the screen, using a normal map to distort the image.  Use this for
    a fish-eye effect, full-screen shimmer/distort etc.
    """
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    c = buildBackBufferCopyPhase(backBufferCopy)
    r = buildPhase(backBufferCopy.texture, None, 'shaders/post_processing/legacy/transfer_distort.fx', straightTransfer4Tap, BW_BLEND_SRCALPHA, BW_BLEND_INVSRCALPHA)
    r.name = 'distort and transfer'
    r.material.distortionTexture = distortionTexture
    e = Effect()
    e.name = 'Distort and Transfer'
    e.phases = [c, r]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:16,代码来源:distortiontransfer.py

示例12: emboss

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def emboss():
    """This method creates and returns a post-process effect that performs
    greyscale embossing using a simple filter-kernel."""
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    c = buildBackBufferCopyPhase(backBufferCopy)
    g = buildGreyscalePhase(backBufferCopy.texture, None)
    s = build9TapFilterPhase(backBufferCopy.texture, None, embossFilter)
    e = Effect()
    e.name = 'Emboss'
    e.phases = [c,
     g,
     c,
     s]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:16,代码来源:emboss.py

示例13: rainbow

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def rainbow():
    """This method creates and returns a post-process effect that draws
    a rainbow, using the angle between the camera and the sun and a MIE
    scattering diagram lookup texture.
    """
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    c = buildBackBufferCopyPhase(backBufferCopy)
    r = buildPhase(backBufferCopy.texture, None, 'shaders/post_processing/legacy/rainbow.fx', straightTransfer4Tap, BW_BLEND_ONE, BW_BLEND_ONE)
    r.name = 'decode lee diagram'
    r.material.lookupTexture = 'system/maps/post_processing/lee_diagram.bmp'
    e = Effect()
    e.name = 'Rainbow'
    e.phases = [c, r]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:16,代码来源:rainbow.py

示例14: lensExplicit

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def lensExplicit():
    """This method creates and returns a post-process effect that performs
    lens simulation. It allows direct control over the depth-of-field area
    and the falloff gradients.  It outputs to an intermediate buffer,
    designed for use by one of the depth-of-field simulations.
    """
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    fpComputeBuffer1 = rt('PostProcessing/fpComputeBuffer1')
    c = buildBackBufferCopyPhase(backBufferCopy)
    w = buildExplicitLensSimulationPhase(backBufferCopy.texture, fpComputeBuffer1)
    e = Effect()
    e.name = 'Explicit Lens Simulation'
    e.phases = [c, w]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:16,代码来源:depthoffield.py

示例15: lensSimulation

# 需要导入模块: from PostProcessing import Effect [as 别名]
# 或者: from PostProcessing.Effect import name [as 别名]
def lensSimulation():
    """This method creates and returns a post-process effect that performs
    lens simulation. It does this mathematically via the thin-lens formula,
    simulating focal length, aperture and zFocus.  It outputs to an
    intermediate buffer, designed for use by one of the depth-of-field
    simulations.
    """
    backBufferCopy = rt('PostProcessing/backBufferCopy')
    fpComputeBuffer1 = rt('PostProcessing/fpComputeBuffer1')
    c = buildBackBufferCopyPhase(backBufferCopy)
    w = buildThinLensSimulationPhase(backBufferCopy.texture, fpComputeBuffer1)
    e = Effect()
    e.name = 'Thin Lens Simulation'
    e.phases = [c, w]
    return e
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:17,代码来源:depthoffield.py


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