Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CommonFilters Class Reference

## Public Member Functions
| __init__ (self, win, cam)
| cleanup (self)
| delAmbientOcclusion (self)
| delBloom (self)
| delBlurSharpen (self)
| delCartoonInk (self)
| delExposureAdjust (self)
| delGammaAdjust (self)
| delHalfPixelShift (self)
| delHighDynamicRange (self)
| delInverted (self)
| delMSAA (self)
| delSrgbEncode (self)
| delViewGlow (self)
| delVolumetricLighting (self)
| reconfigure (self, fullrebuild, changed)
| setAmbientOcclusion (self, numsamples=16, radius=0.05, amount=2.0, strength=0.01, falloff=0.000002)
| setBloom (self, blend=(0.3, 0.4, 0.3, 0.0), mintrigger=0.6, maxtrigger=1.0, desat=0.6, intensity=1.0, size="medium")
| setBlurSharpen (self, amount=0.0)
| setCartoonInk (self, separation=1, color=(0, 0, 0, 1))
| setExposureAdjust (self, stops)
| setGammaAdjust (self, gamma)
| setHalfPixelShift (self)
| setHighDynamicRange (self, tonemap=ToneMap.ACES)
| setInverted (self)
| setMSAA (self, samples)
| setSrgbEncode (self, force=False)
| setViewGlow (self)
| setVolumetricLighting (self, caster, numsamples=32, density=5.0, decay=0.1, exposure=0.1, source="color")
| update (self, task=None)

## Public Attributes
list | bloom = []
list | blur = []
dict | configuration = {}
| finalQuad = None
| manager = FilterManager(win, cam)
list | ssao = []
| task = None
dict | textures = {}

## Static Public Attributes
| del_ambient_occlusion = delAmbientOcclusion
| del_bloom = delBloom
| del_blur_sharpen = delBlurSharpen
| del_cartoon_ink = delCartoonInk
| del_exposure_adjust = delExposureAdjust
| del_gamma_adjust = delGammaAdjust
| del_half_pixel_shift = delHalfPixelShift
| del_high_dynamic_range = delHighDynamicRange
| del_inverted = delInverted
| del_msaa = delMSAA
| del_srgb_encode = delSrgbEncode
| del_view_glow = delViewGlow
| del_volumetric_lighting = delVolumetricLighting
| set_ambient_occlusion = setAmbientOcclusion
| set_bloom = setBloom
| set_blur_sharpen = setBlurSharpen
| set_cartoon_ink = setCartoonInk
| set_exposure_adjust = setExposureAdjust
| set_gamma_adjust = setGammaAdjust
| set_half_pixel_shift = setHalfPixelShift
| set_high_dynamic_range = setHighDynamicRange
| set_inverted = setInverted
| set_msaa = setMSAA
| set_srgb_encode = setSrgbEncode
| set_view_glow = setViewGlow
| set_volumetric_lighting = setVolumetricLighting

## Detailed Description

     Class CommonFilters implements certain common image postprocessing
    filters.  The constructor requires a filter builder as a parameter.

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | win,
|  |  | cam )

## Member Function Documentation

## ◆ cleanup()

cleanup | ( |  | self | ) |

## ◆ delAmbientOcclusion()

delAmbientOcclusion | ( |  | self | ) |

## ◆ delBloom()

delBloom | ( |  | self | ) |

## ◆ delBlurSharpen()

delBlurSharpen | ( |  | self | ) |

## ◆ delCartoonInk()

delCartoonInk | ( |  | self | ) |

## ◆ delExposureAdjust()

delExposureAdjust | ( |  | self | ) |

## ◆ delGammaAdjust()

delGammaAdjust | ( |  | self | ) |

## ◆ delHalfPixelShift()

delHalfPixelShift | ( |  | self | ) |

## ◆ delHighDynamicRange()

delHighDynamicRange | ( |  | self | ) |

## ◆ delInverted()

delInverted | ( |  | self | ) |

## ◆ delMSAA()

delMSAA | ( |  | self | ) |

## ◆ delSrgbEncode()

delSrgbEncode | ( |  | self | ) |

     Reverses the effects of setSrgbEncode.

## ◆ delViewGlow()

delViewGlow | ( |  | self | ) |

## ◆ delVolumetricLighting()

delVolumetricLighting | ( |  | self | ) |

## ◆ reconfigure()

reconfigure | ( |  | self,
|  |  | fullrebuild,
|  |  | changed )

     Reconfigure is called whenever any configuration change is made.

## ◆ setAmbientOcclusion()

setAmbientOcclusion | ( |  | self,
|  |  | numsamples = 16,
|  |  | radius = 0.05,
|  |  | amount = 2.0,
|  |  | strength = 0.01,
|  |  | falloff = 0.000002 )

## ◆ setBloom()

setBloom | ( |  | self,
|  |  | blend = (0.3,0.4,0.3,0.0),
|  |  | mintrigger = 0.6,
|  |  | maxtrigger = 1.0,
|  |  | desat = 0.6,
|  |  | intensity = 1.0,
|  |  | size = "medium" )

    Applies the Bloom filter to the output.
    size can either be "off", "small", "medium", or "large".
    Setting size to "off" will remove the Bloom filter.

## ◆ setBlurSharpen()

setBlurSharpen | ( |  | self,
|  |  | amount = 0.0 )

    Enables the blur/sharpen filter. If the 'amount' parameter is 1.0, it will not have any effect.
    A value of 0.0 means fully blurred, and a value higher than 1.0 sharpens the image.

## ◆ setCartoonInk()

setCartoonInk | ( |  | self,
|  |  | separation = 1,
|  |  | color = (0, 0, 0, 1) )

## ◆ setExposureAdjust()

setExposureAdjust | ( |  | self,
|  |  | stops )

     Sets a relative exposure adjustment to multiply with the result of
    rendering the scene, in stops.  A value of 0 means no adjustment, a
    positive value will result in a brighter image.  Useful in conjunction
    with HDR, see setHighDynamicRange.

    .. versionadded:: 1.10.7

## ◆ setGammaAdjust()

setGammaAdjust | ( |  | self,
|  |  | gamma )

     Applies additional gamma correction to the image.  1.0 = no correction.

## ◆ setHalfPixelShift()

setHalfPixelShift | ( |  | self | ) |

## ◆ setHighDynamicRange()

setHighDynamicRange | ( |  | self,
|  |  | tonemap = ToneMap.ACES )

     Enables HDR rendering by using a floating-point framebuffer,
    disabling color clamping on the main scene, and applying a tone map
    operator (ACES or Khronos PBR Neutral).

    It may also be necessary to use setExposureAdjust to perform exposure
    compensation on the scene, depending on the lighting intensity.

    .. versionadded:: 1.10.7

## ◆ setInverted()

setInverted | ( |  | self | ) |

## ◆ setMSAA()

setMSAA | ( |  | self,
|  |  | samples )

    Enables multisample anti-aliasing on the render-to-texture buffer.
    If you enable this, it is recommended to leave any multisample request
    on the main framebuffer OFF (ie. don't set framebuffer-multisample true
    in Config.prc), since it would be a waste of resources otherwise.

    .. versionadded:: 1.10.13

## ◆ setSrgbEncode()

setSrgbEncode | ( |  | self,
|  |  | force = False )

     Applies the inverse sRGB EOTF to the output, unless the window
    already has an sRGB framebuffer, in which case this filter refuses to
    apply, to prevent accidental double-application.

    Set the force argument to True to force it to be applied in all cases.

    .. versionadded:: 1.10.7

## ◆ setViewGlow()

setViewGlow | ( |  | self | ) |

## ◆ setVolumetricLighting()

setVolumetricLighting | ( |  | self,
|  |  | caster,
|  |  | numsamples = 32,
|  |  | density = 5.0,
|  |  | decay = 0.1,
|  |  | exposure = 0.1,
|  |  | source = "color" )

## ◆ update()

update | ( |  | self,
|  |  | task = None )

    Updates the shader inputs that need to be updated every frame.
    Normally, you shouldn't call this, it's being called in a task.

## Member Data Documentation

## ◆ bloom

list bloom = []

## ◆ blur

list blur = []

## ◆ configuration

configuration = {}

## ◆ del_ambient_occlusion

del_ambient_occlusion = delAmbientOcclusion
| static

## ◆ del_bloom

del_bloom = delBloom
| static

## ◆ del_blur_sharpen

del_blur_sharpen = delBlurSharpen
| static

## ◆ del_cartoon_ink

del_cartoon_ink = delCartoonInk
| static

## ◆ del_exposure_adjust

del_exposure_adjust = delExposureAdjust
| static

## ◆ del_gamma_adjust

del_gamma_adjust = delGammaAdjust
| static

## ◆ del_half_pixel_shift

del_half_pixel_shift = delHalfPixelShift
| static

## ◆ del_high_dynamic_range

del_high_dynamic_range = delHighDynamicRange
| static

## ◆ del_inverted

del_inverted = delInverted
| static

## ◆ del_msaa

del_msaa = delMSAA
| static

## ◆ del_srgb_encode

del_srgb_encode = delSrgbEncode
| static

## ◆ del_view_glow

del_view_glow = delViewGlow
| static

## ◆ del_volumetric_lighting

del_volumetric_lighting = delVolumetricLighting
| static

## ◆ finalQuad

finalQuad = None

## ◆ manager

manager = FilterManager(win, cam)

## ◆ set_ambient_occlusion

set_ambient_occlusion = setAmbientOcclusion
| static

## ◆ set_bloom

set_bloom = setBloom
| static

## ◆ set_blur_sharpen

set_blur_sharpen = setBlurSharpen
| static

## ◆ set_cartoon_ink

set_cartoon_ink = setCartoonInk
| static

## ◆ set_exposure_adjust

set_exposure_adjust = setExposureAdjust
| static

## ◆ set_gamma_adjust

set_gamma_adjust = setGammaAdjust
| static

## ◆ set_half_pixel_shift

set_half_pixel_shift = setHalfPixelShift
| static

## ◆ set_high_dynamic_range

set_high_dynamic_range = setHighDynamicRange
| static

## ◆ set_inverted

set_inverted = setInverted
| static

## ◆ set_msaa

set_msaa = setMSAA
| static

## ◆ set_srgb_encode

set_srgb_encode = setSrgbEncode
| static

## ◆ set_view_glow

set_view_glow = setViewGlow
| static

## ◆ set_volumetric_lighting

set_volumetric_lighting = setVolumetricLighting
| static

## ◆ ssao

list ssao = []

## ◆ task

task = None

## ◆ textures

dict textures = {}