Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
| #pragma BLENDER_REQUIRE(common_math_lib.glsl) | #pragma BLENDER_REQUIRE(common_math_lib.glsl) | ||||
| #pragma BLENDER_REQUIRE(common_math_geom_lib.glsl) | #pragma BLENDER_REQUIRE(common_math_geom_lib.glsl) | ||||
| #pragma BLENDER_REQUIRE(raytrace_lib.glsl) | #pragma BLENDER_REQUIRE(raytrace_lib.glsl) | ||||
| #pragma BLENDER_REQUIRE(surface_lib.glsl) | |||||
| /* Based on Practical Realtime Strategies for Accurate Indirect Occlusion | /* Based on Practical Realtime Strategies for Accurate Indirect Occlusion | ||||
| * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pdf | * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pdf | ||||
| * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pptx | * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pptx | ||||
| */ | */ | ||||
| #if defined(MESH_SHADER) | #if defined(MESH_SHADER) | ||||
| # if !defined(USE_ALPHA_HASH) | # if !defined(USE_ALPHA_HASH) | ||||
| Show All 12 Lines | |||||
| # define ENABLE_DEFERED_AO | # define ENABLE_DEFERED_AO | ||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| #ifndef GPU_FRAGMENT_SHADER | #ifndef GPU_FRAGMENT_SHADER | ||||
| # define gl_FragCoord vec4(0.0) | # define gl_FragCoord vec4(0.0) | ||||
| #endif | #endif | ||||
| uniform sampler2D horizonBuffer; | |||||
| /* aoSettings flags */ | /* aoSettings flags */ | ||||
| #define USE_AO 1 | #define USE_AO 1 | ||||
| #define USE_BENT_NORMAL 2 | #define USE_BENT_NORMAL 2 | ||||
| #define USE_DENOISE 4 | #define USE_DENOISE 4 | ||||
| #define NO_OCCLUSION_DATA OcclusionData(vec4(M_PI, -M_PI, M_PI, -M_PI), 1.0) | #define NO_OCCLUSION_DATA OcclusionData(vec4(M_PI, -M_PI, M_PI, -M_PI), 1.0) | ||||
| struct OcclusionData { | struct OcclusionData { | ||||
| ▲ Show 20 Lines • Show All 419 Lines • Show Last 20 Lines | |||||