Panda3D

Loading...
Searching...
No Matches
Classes | Variables
direct.filter.CommonFilters Namespace Reference

## Classes
class | CommonFilters
class | FilterConfig
class | ToneMap

## Variables
str | CARTOON_BODY
str | SSAO_BODY

## Detailed Description

    Class CommonFilters implements certain common image
    postprocessing filters.  See the :ref:`common-image-filters` page for
    more information about how to use these filters.

    These filters are written in the Cg shading language.

## Variable Documentation

## ◆ CARTOON_BODY

str CARTOON_BODY

Initial value:
1= """
2 float4 cartoondelta = k_cartoonseparation * texpix_txaux.xwyw;
3 float4 cartoon_c0 = tex2D(k_txaux, %(texcoord)s + cartoondelta.xy);
4 float4 cartoon_c1 = tex2D(k_txaux, %(texcoord)s - cartoondelta.xy);
5 float4 cartoon_c2 = tex2D(k_txaux, %(texcoord)s + cartoondelta.wz);
6 float4 cartoon_c3 = tex2D(k_txaux, %(texcoord)s - cartoondelta.wz);
7 float4 cartoon_mx = max(cartoon_c0, max(cartoon_c1, max(cartoon_c2, cartoon_c3)));
8 float4 cartoon_mn = min(cartoon_c0, min(cartoon_c1, min(cartoon_c2, cartoon_c3)));
9 float cartoon_thresh = saturate(dot(cartoon_mx - cartoon_mn, float4(3,3,0,0)) - 0.5);
10 o_color = lerp(o_color, k_cartooncolor, cartoon_thresh);
11"""

## ◆ SSAO_BODY

str SSAO_BODY