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

Classes

class  CommonFilters
 
class  FilterConfig
 

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

◆ SSAO_BODY

str SSAO_BODY