Blender V5.3
eevee::film::Film Struct Reference

#include <eevee_film.bsl.hh>

Public Member Functions

float quantization_dither ()
void process_render_sample (int2 texel_film, float4 &out_color, float &out_depth)
Filter
float3 panoramic_direction_get (float2 film_co)
float3 panoramic_direction_get (int2 texel_film)
bool panoramic_texel_is_owned_by_view (float3 camera_direction, ePanoramicFace view_id)
ePanoramicFace panoramic_view_id_get ()
bool sample_is_black (FilmSample samp)
FilmSample panoramic_sample_get (int sample_n, int2 texel_film)
FilmSample sample_get (int sample_n, int2 texel_film)
FilmSample sample_get (int sample_n, int2 texel_film, const FilmSample(&panoramic_samples)[FILM_PANORAMIC_SAMPLE_LEN])
float weight_accumulation (int2 texel_film)
void sample_accum (FilmSample samp, int pass_id, int layer, sampler2DArray tex, float4 &accum)
void sample_accum (FilmSample samp, int pass_id, int layer, sampler2DArray tex, float &accum)
void sample_accum_mist (FilmSample samp, float &accum)
void sample_accum_combined (FilmSample samp, float4 &accum, float &weight_accum)
void sample_cryptomatte_accum (FilmSample samp, int layer, sampler2D tex, float2(&crypto_samples)[4])
void cryptomatte_layer_accum_and_store (FilmSample dst, int2 texel_film, const FilmSample(&panoramic_samples)[FILM_PANORAMIC_SAMPLE_LEN], int pass_id, int layer_component, float4 &out_color)
Load/Store Data
float distance_load (int2 texel)
float weight_load (int2 texel)
float4 display_color_load (int2 texel_film)
void copy_history (int2 texel_film, float4 &out_color, float &out_depth)
float2 pixel_history_motion_vector (int2 texel_sample)
void get_catmull_rom_weights (float2 t, float2(&weights)[4])
float4 sample_catmull_rom (sampler2D color_tx, float2 input_texel)
void combined_neighbor_boundbox (int2 texel, float4 &min_c, float4 &max_c)
float aabb_clipping_dist_alpha (float origin, float direction, float aabb_min, float aabb_max)
float4 amend_combined_history (float4 min_color, float4 max_color, float4 color_history, float4 src_color)
float history_blend_factor (float velocity, float2 texel, float luma_min, float luma_max, float luma_history)
float4 clamp_negative_values (float4 color)
void store_combined (FilmSample dst, int2 src_texel, float4 color, float color_weight, float4 &display)
void store_color_ex (FilmSample dst, int pass_id, float4 color, float4 &display, bool do_clamp_negative_values)
void store_color (FilmSample dst, int pass_id, float4 color, float4 &display, bool do_clamp_negative_values=true)
void store_color_and_light (FilmSample dst, int color_pass_id, int light_pass_id, float4 color, float4 light, float4 &display)
void store_value (FilmSample dst, int pass_id, float value, float4 &display)
void store_data (int2 texel_film, int pass_id, float4 data_sample, float4 &display)
void store_depth (int2 texel_film, int2 texel_sample, float value, float &out_depth)
void store_denoising_depth (FilmSample dst, float value, float4 &display)
void store_distance (int2 texel, float value)
void store_weight (int2 texel, float value)

Public Attributes

FilmConstants constants
CameraVelocity camera
draw::View views
Uniform uniforms
Sampling sampling
Cryptomatte cryptomatte
uint enabled_categories
int samples_len
bool use_reprojection
int scaling_factor
int combined_id
int display_id
int normal_id
sampler2DDepth depth_tx
sampler2D combined_tx
sampler2D vector_tx
sampler2DArray rp_color_tx
sampler2DArray rp_value_tx
sampler2D cryptomatte_tx
sampler2D in_combined_tx
const image2DArray in_weight_img
image2DArray out_weight_img
image2D out_combined_img
image2D depth_img
image2DArray color_accum_img
image2DArray value_accum_img
image2D denoising_depth_img

Detailed Description

Definition at line 138 of file eevee_film.bsl.hh.

Member Function Documentation

◆ aabb_clipping_dist_alpha()

float eevee::film::Film::aabb_clipping_dist_alpha ( float origin,
float direction,
float aabb_min,
float aabb_max )
inline

Definition at line 684 of file eevee_film.bsl.hh.

References abs.

Referenced by amend_combined_history().

◆ amend_combined_history()

float4 eevee::film::Film::amend_combined_history ( float4 min_color,
float4 max_color,
float4 color_history,
float4 src_color )
inline

Definition at line 694 of file eevee_film.bsl.hh.

References aabb_clipping_dist_alpha(), line_aabb_clipping_dist(), and saturate.

Referenced by store_combined().

◆ clamp_negative_values()

float4 eevee::film::Film::clamp_negative_values ( float4 color)
inline

Definition at line 743 of file eevee_film.bsl.hh.

References unroll.

Referenced by store_color_ex(), and store_combined().

◆ combined_neighbor_boundbox()

void eevee::film::Film::combined_neighbor_boundbox ( int2 texel,
float4 & min_c,
float4 & max_c )
inline

Simple bounding box calculation in YCoCg as described in: "High Quality Temporal Supersampling" by Brian Karis at SIGGRAPH 2014

Definition at line 622 of file eevee_film.bsl.hh.

References abs, combined_tx, max, min, sqrt, square(), and eevee::film::texelfetch_as_YCoCg_opacity().

Referenced by store_combined().

◆ copy_history()

void eevee::film::Film::copy_history ( int2 texel_film,
float4 & out_color,
float & out_depth )
inline

◆ cryptomatte_layer_accum_and_store()

void eevee::film::Film::cryptomatte_layer_accum_and_store ( FilmSample dst,
int2 texel_film,
const FilmSample(&) panoramic_samples[FILM_PANORAMIC_SAMPLE_LEN],
int pass_id,
int layer_component,
float4 & out_color )
inline

◆ display_color_load()

◆ distance_load()

float eevee::film::Film::distance_load ( int2 texel)
inline

◆ get_catmull_rom_weights()

void eevee::film::Film::get_catmull_rom_weights ( float2 t,
float2(&) weights[4] )
inline

Definition at line 551 of file eevee_film.bsl.hh.

Referenced by sample_catmull_rom().

◆ history_blend_factor()

float eevee::film::Film::history_blend_factor ( float velocity,
float2 texel,
float luma_min,
float luma_max,
float luma_history )
inline

"High Quality Temporal Supersampling" by Brian Karis at SIGGRAPH 2014 (Slide 43) Bias towards history if incoming pixel is near clamping. Reduces flicker.

Definition at line 713 of file eevee_film.bsl.hh.

References any(), greaterThanEqual, lessThan, mix, reduce_min(), safe_rcp(), saturate, eevee::Uniform::uniform_buf, and uniforms.

Referenced by store_combined().

◆ panoramic_direction_get() [1/2]

float3 eevee::film::Film::panoramic_direction_get ( float2 film_co)
inline

◆ panoramic_direction_get() [2/2]

float3 eevee::film::Film::panoramic_direction_get ( int2 texel_film)
inline

Definition at line 194 of file eevee_film.bsl.hh.

References panoramic_direction_get().

◆ panoramic_sample_get()

FilmSample eevee::film::Film::panoramic_sample_get ( int sample_n,
int2 texel_film )
inline

◆ panoramic_texel_is_owned_by_view()

bool eevee::film::Film::panoramic_texel_is_owned_by_view ( float3 camera_direction,
ePanoramicFace view_id )
inline

Definition at line 199 of file eevee_film.bsl.hh.

References is_zero(), and eevee::film::panoramic_face_index().

Referenced by panoramic_sample_get().

◆ panoramic_view_id_get()

ePanoramicFace eevee::film::Film::panoramic_view_id_get ( )
inline

◆ pixel_history_motion_vector()

float2 eevee::film::Film::pixel_history_motion_vector ( int2 texel_sample)
inline

Dilate velocity by using the nearest pixel in a cross pattern. "High Quality Temporal Supersampling" by Brian Karis at SIGGRAPH 2014 (Slide 27)

Definition at line 520 of file eevee_film.bsl.hh.

References camera, clamp(), depth_tx, reverse_z::read(), texelFetch(), textureSize(), eevee::Uniform::uniform_buf, uniforms, vector_tx, views, and x.

Referenced by store_combined().

◆ process_render_sample()

◆ quantization_dither()

float eevee::film::Film::quantization_dither ( )
inline

Definition at line 177 of file eevee_film.bsl.hh.

References eevee::Sampling::rng_1D_get(), and sampling.

Referenced by store_color_ex(), store_combined(), and store_value().

◆ sample_accum() [1/2]

void eevee::film::Film::sample_accum ( FilmSample samp,
int pass_id,
int layer,
sampler2DArray tex,
float & accum )
inline

Definition at line 355 of file eevee_film.bsl.hh.

References layer, sample_is_black(), and texelFetch().

◆ sample_accum() [2/2]

void eevee::film::Film::sample_accum ( FilmSample samp,
int pass_id,
int layer,
sampler2DArray tex,
float4 & accum )
inline

Definition at line 345 of file eevee_film.bsl.hh.

References layer, sample_is_black(), and texelFetch().

Referenced by process_render_sample().

◆ sample_accum_combined()

void eevee::film::Film::sample_accum_combined ( FilmSample samp,
float4 & accum,
float & weight_accum )
inline

◆ sample_accum_mist()

void eevee::film::Film::sample_accum_mist ( FilmSample samp,
float & accum )
inline

◆ sample_catmull_rom()

float4 eevee::film::Film::sample_catmull_rom ( sampler2D color_tx,
float2 input_texel )
inline

Use optimized version by leveraging bilinear filtering from hardware sampler and by removing corner taps. From "Filmic SMAA" by Jorge Jimenez at SIGGRAPH 2016 http://advances.realtimerendering.com/s2016/Filmic%20SMAA%20v7.pptx

Definition at line 568 of file eevee_film.bsl.hh.

References clamp(), get_catmull_rom_weights(), greaterThan, modf, reduce_add(), texelFetch(), textureLod(), textureSize(), eevee::Uniform::uniform_buf, uniforms, float4::w, float2::x, float4::x, x, float2::y, float4::y, y, and float4::z.

Referenced by store_combined().

◆ sample_cryptomatte_accum()

void eevee::film::Film::sample_cryptomatte_accum ( FilmSample samp,
int layer,
sampler2D tex,
float2(&) crypto_samples[4] )
inline

Definition at line 400 of file eevee_film.bsl.hh.

References hash, layer, sample_is_black(), texelFetch(), x, and y.

Referenced by cryptomatte_layer_accum_and_store().

◆ sample_get() [1/2]

FilmSample eevee::film::Film::sample_get ( int sample_n,
int2 texel_film )
inline

◆ sample_get() [2/2]

FilmSample eevee::film::Film::sample_get ( int sample_n,
int2 texel_film,
const FilmSample(&) panoramic_samples[FILM_PANORAMIC_SAMPLE_LEN] )
inline

◆ sample_is_black()

bool eevee::film::Film::sample_is_black ( FilmSample samp)
inline

◆ store_color()

void eevee::film::Film::store_color ( FilmSample dst,
int pass_id,
float4 color,
float4 & display,
bool do_clamp_negative_values = true )
inline

Definition at line 859 of file eevee_film.bsl.hh.

References color_accum_img, imageLoadFast, and store_color_ex().

Referenced by process_render_sample().

◆ store_color_and_light()

void eevee::film::Film::store_color_and_light ( FilmSample dst,
int color_pass_id,
int light_pass_id,
float4 color,
float4 light,
float4 & display )
inline

◆ store_color_ex()

void eevee::film::Film::store_color_ex ( FilmSample dst,
int pass_id,
float4 color,
float4 & display,
bool do_clamp_negative_values )
inline

◆ store_combined()

◆ store_data()

void eevee::film::Film::store_data ( int2 texel_film,
int pass_id,
float4 data_sample,
float4 & display )
inline

Definition at line 926 of file eevee_film.bsl.hh.

References color_accum_img, display_id, and imageStoreFast.

Referenced by process_render_sample().

◆ store_denoising_depth()

void eevee::film::Film::store_denoising_depth ( FilmSample dst,
float value,
float4 & display )
inline

◆ store_depth()

void eevee::film::Film::store_depth ( int2 texel_film,
int2 texel_sample,
float value,
float & out_depth )
inline

◆ store_distance()

void eevee::film::Film::store_distance ( int2 texel,
float value )
inline

Definition at line 975 of file eevee_film.bsl.hh.

References imageStoreFast, and out_weight_img.

Referenced by process_render_sample().

◆ store_value()

void eevee::film::Film::store_value ( FilmSample dst,
int pass_id,
float value,
float4 & display )
inline

◆ store_weight()

void eevee::film::Film::store_weight ( int2 texel,
float value )
inline

Definition at line 980 of file eevee_film.bsl.hh.

References imageStoreFast, and out_weight_img.

Referenced by process_render_sample().

◆ weight_accumulation()

float eevee::film::Film::weight_accumulation ( int2 texel_film)
inline

◆ weight_load()

float eevee::film::Film::weight_load ( int2 texel)
inline

Member Data Documentation

◆ camera

CameraVelocity eevee::film::Film::camera

Definition at line 141 of file eevee_film.bsl.hh.

Referenced by pixel_history_motion_vector(), and process_render_sample().

◆ color_accum_img

image2DArray eevee::film::Film::color_accum_img

◆ combined_id

int eevee::film::Film::combined_id

◆ combined_tx

sampler2D eevee::film::Film::combined_tx

Definition at line 157 of file eevee_film.bsl.hh.

Referenced by combined_neighbor_boundbox(), and sample_accum_combined().

◆ constants

FilmConstants eevee::film::Film::constants

Definition at line 139 of file eevee_film.bsl.hh.

Referenced by process_render_sample(), sample_get(), sample_is_black(), and store_depth().

◆ cryptomatte

Cryptomatte eevee::film::Film::cryptomatte

◆ cryptomatte_tx

sampler2D eevee::film::Film::cryptomatte_tx

Definition at line 161 of file eevee_film.bsl.hh.

Referenced by cryptomatte_layer_accum_and_store().

◆ denoising_depth_img

image2D eevee::film::Film::denoising_depth_img

Definition at line 174 of file eevee_film.bsl.hh.

Referenced by store_denoising_depth().

◆ depth_img

image2D eevee::film::Film::depth_img

Definition at line 171 of file eevee_film.bsl.hh.

Referenced by copy_history(), process_render_sample(), and store_depth().

◆ depth_tx

◆ display_id

int eevee::film::Film::display_id

◆ enabled_categories

uint eevee::film::Film::enabled_categories

Definition at line 147 of file eevee_film.bsl.hh.

Referenced by process_render_sample().

◆ in_combined_tx

sampler2D eevee::film::Film::in_combined_tx

Definition at line 164 of file eevee_film.bsl.hh.

Referenced by copy_history(), display_color_load(), and store_combined().

◆ in_weight_img

const image2DArray eevee::film::Film::in_weight_img

Definition at line 166 of file eevee_film.bsl.hh.

Referenced by distance_load(), and weight_load().

◆ normal_id

int eevee::film::Film::normal_id

Definition at line 153 of file eevee_film.bsl.hh.

Referenced by process_render_sample().

◆ out_combined_img

image2D eevee::film::Film::out_combined_img

Definition at line 170 of file eevee_film.bsl.hh.

Referenced by copy_history(), and store_combined().

◆ out_weight_img

image2DArray eevee::film::Film::out_weight_img

Definition at line 167 of file eevee_film.bsl.hh.

Referenced by copy_history(), store_distance(), and store_weight().

◆ rp_color_tx

sampler2DArray eevee::film::Film::rp_color_tx

Definition at line 159 of file eevee_film.bsl.hh.

Referenced by process_render_sample().

◆ rp_value_tx

sampler2DArray eevee::film::Film::rp_value_tx

Definition at line 160 of file eevee_film.bsl.hh.

Referenced by process_render_sample().

◆ samples_len

int eevee::film::Film::samples_len

◆ sampling

Sampling eevee::film::Film::sampling

Definition at line 144 of file eevee_film.bsl.hh.

Referenced by panoramic_sample_get(), and quantization_dither().

◆ scaling_factor

int eevee::film::Film::scaling_factor

Definition at line 150 of file eevee_film.bsl.hh.

Referenced by sample_get(), and weight_accumulation().

◆ uniforms

◆ use_reprojection

bool eevee::film::Film::use_reprojection

◆ value_accum_img

image2DArray eevee::film::Film::value_accum_img

Definition at line 173 of file eevee_film.bsl.hh.

Referenced by display_color_load(), and store_value().

◆ vector_tx

sampler2D eevee::film::Film::vector_tx

Definition at line 158 of file eevee_film.bsl.hh.

Referenced by pixel_history_motion_vector(), and process_render_sample().

◆ views


The documentation for this struct was generated from the following file: