Blender  V3.3
Macros | Functions
workbench_effect_cavity.c File Reference
#include "DRW_render.h"
#include "BLI_rand.h"
#include "../eevee/eevee_lut.h"
#include "workbench_engine.h"
#include "workbench_private.h"

Go to the source code of this file.

Macros

#define JITTER_TEX_SIZE   64
 
#define CAVITY_MAX_SAMPLES   512
 

Functions

static floatcreate_disk_samples (int num_samples, int num_iterations)
 
static struct GPUTexturecreate_jitter_texture (int num_samples)
 
BLI_INLINE int workbench_cavity_total_sample_count (const WORKBENCH_PrivateData *wpd, const Scene *scene)
 
void workbench_cavity_data_update (WORKBENCH_PrivateData *wpd, WORKBENCH_UBO_World *wd)
 
void workbench_cavity_samples_ubo_ensure (WORKBENCH_PrivateData *wpd)
 
void workbench_cavity_cache_init (WORKBENCH_Data *data)
 

Detailed Description

Cavity Effect:

We use Screen Space Ambient Occlusion (SSAO) to enhance geometric details of the surfaces. We also use a Curvature effect computed only using the surface normals.

This is done after the opaque pass. It only affects the opaque surfaces.

Definition in file workbench_effect_cavity.c.

Macro Definition Documentation

◆ CAVITY_MAX_SAMPLES

#define CAVITY_MAX_SAMPLES   512

Definition at line 25 of file workbench_effect_cavity.c.

◆ JITTER_TEX_SIZE

#define JITTER_TEX_SIZE   64

Definition at line 24 of file workbench_effect_cavity.c.

Function Documentation

◆ create_disk_samples()

static float* create_disk_samples ( int  num_samples,
int  num_iterations 
)
static

◆ create_jitter_texture()

static struct GPUTexture* create_jitter_texture ( int  num_samples)
static

◆ workbench_cavity_cache_init()

void workbench_cavity_cache_init ( WORKBENCH_Data data)

◆ workbench_cavity_data_update()

void workbench_cavity_data_update ( WORKBENCH_PrivateData wpd,
WORKBENCH_UBO_World wd 
)

◆ workbench_cavity_samples_ubo_ensure()

void workbench_cavity_samples_ubo_ensure ( WORKBENCH_PrivateData wpd)

◆ workbench_cavity_total_sample_count()

BLI_INLINE int workbench_cavity_total_sample_count ( const WORKBENCH_PrivateData wpd,
const Scene scene 
)