Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_occlusion.c
| Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | if ((effects->enabled_effects & EFFECT_GTAO) != 0) { | ||||
| * We separate the computation into 2 steps. | * We separate the computation into 2 steps. | ||||
| * | * | ||||
| * - First we scan the neighborhood pixels to find the maximum horizon angle. | * - First we scan the neighborhood pixels to find the maximum horizon angle. | ||||
| * We save this angle in a RG8 array texture. | * We save this angle in a RG8 array texture. | ||||
| * | * | ||||
| * - Then we use this angle to compute occlusion with the shading normal at | * - Then we use this angle to compute occlusion with the shading normal at | ||||
| * the shading stage. This let us do correct shadowing for each diffuse / specular | * the shading stage. This let us do correct shadowing for each diffuse / specular | ||||
| * lobe present in the shader using the correct normal. | * lobe present in the shader using the correct normal. | ||||
| **/ | */ | ||||
| psl->ao_horizon_search = DRW_pass_create("GTAO Horizon Search", DRW_STATE_WRITE_COLOR); | psl->ao_horizon_search = DRW_pass_create("GTAO Horizon Search", DRW_STATE_WRITE_COLOR); | ||||
| DRWShadingGroup *grp = DRW_shgroup_create(e_data.gtao_sh, psl->ao_horizon_search); | DRWShadingGroup *grp = DRW_shgroup_create(e_data.gtao_sh, psl->ao_horizon_search); | ||||
| DRW_shgroup_uniform_texture(grp, "utilTex", EEVEE_materials_get_util_tex()); | DRW_shgroup_uniform_texture(grp, "utilTex", EEVEE_materials_get_util_tex()); | ||||
| DRW_shgroup_uniform_texture_ref(grp, "maxzBuffer", &txl->maxzbuffer); | DRW_shgroup_uniform_texture_ref(grp, "maxzBuffer", &txl->maxzbuffer); | ||||
| DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &effects->ao_src_depth); | DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &effects->ao_src_depth); | ||||
| DRW_shgroup_uniform_block(grp, "common_block", sldata->common_ubo); | DRW_shgroup_uniform_block(grp, "common_block", sldata->common_ubo); | ||||
| DRW_shgroup_call_add(grp, quad, NULL); | DRW_shgroup_call_add(grp, quad, NULL); | ||||
| ▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines | |||||