Blender V5.3
filters Namespace Reference

Functions

float gaussian_factor (float linear_distance, float standard_deviation)
float gaussian_weight (float factor, float square_distance)
float planar_weight (float3 plane_N, float3 plane_P, float3 P, float scale)
float angle_weight (float3 center_N, float3 sample_N)

Detailed Description

Filtering utilities.

Function Documentation

◆ angle_weight()

float filters::angle_weight ( float3 center_N,
float3 sample_N )

◆ gaussian_factor()

float filters::gaussian_factor ( float linear_distance,
float standard_deviation )

Return the factor to filter_gaussian_weight. This is handy utility function to compute your gaussian parameter in a documented manner.

  • linear_distance is the distance at which the filter will have covered the given amount of standard_deviation. Must not be null.
  • standard_deviation is the shape of the bell. Higher values sharpens the filter.

https://en.wikipedia.org/wiki/Standard_deviation#/media/File:Standard_deviation_diagram.svg

Example: for a 5px 1d gaussian filter, one would set linear_distance of 2.5f. standard_deviation = 1.0 will cover 68% of the gaussian weight inside the 5px radius. standard_deviation = 2.0 will cover 95% of the gaussian weight inside the 5px radius.

Definition at line 29 of file eevee_filter.bsl.hh.

References gaussian_factor(), and square().

Referenced by eevee::raytracing::denoise::bilateral_main(), gaussian_factor(), and eevee::fast_gi::SampleInput::sample_weight_get().

◆ gaussian_weight()

float filters::gaussian_weight ( float factor,
float square_distance )

Gaussian distance weighting. Allow weighting based on distance without null weight whatever the distance. factor is supposed to be a scaling parameter given by filter_gaussian_factor.

Definition at line 40 of file eevee_filter.bsl.hh.

References exp2, and gaussian_weight().

Referenced by eevee::raytracing::denoise::bilateral_main(), gaussian_weight(), planar_weight(), and eevee::fast_gi::SampleInput::sample_weight_get().

◆ planar_weight()

float filters::planar_weight ( float3 plane_N,
float3 plane_P,
float3 P,
float scale )