Differential D16826 Diff 59819 source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl
| #pragma BLENDER_REQUIRE(common_view_lib.glsl) | #pragma BLENDER_REQUIRE(common_view_lib.glsl) | ||||
| #pragma BLENDER_REQUIRE(workbench_common_lib.glsl) | #pragma BLENDER_REQUIRE(workbench_common_lib.glsl) | ||||
| /* From The Alchemy screen-space ambient obscurance algorithm | /* From The Alchemy screen-space ambient obscurance algorithm | ||||
| * http://graphics.cs.williams.edu/papers/AlchemyHPG11/VV11AlchemyAO.pdf */ | * http://graphics.cs.williams.edu/papers/AlchemyHPG11/VV11AlchemyAO.pdf */ | ||||
| #ifdef WORKBENCH_CAVITY | |||||
| # define USE_CAVITY | |||||
| # define cavityJitter jitter_tx | |||||
| # define samples_coords cavity_samples | |||||
| #endif | |||||
| #ifdef USE_CAVITY | #ifdef USE_CAVITY | ||||
| void cavity_compute(vec2 screenco, | void cavity_compute(vec2 screenco, | ||||
| depth2D depthBuffer, | depth2D depthBuffer, | ||||
| sampler2D normalBuffer, | sampler2D normalBuffer, | ||||
| out float cavities, | out float cavities, | ||||
| out float edges) | out float edges) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||