diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-08-14 15:27:08 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-08-14 21:40:04 +0300 |
commit | 659b63751d639c8a70c5c6e825168d055405f146 (patch) | |
tree | 102a97098be94cad7008fdc35d495227855921d9 /source/blender/draw/engines/eevee_next/eevee_pipeline.cc | |
parent | 67d7792503e4f598d8620818b1d9887670e144da (diff) |
EEVEE-Next: Light: Add light evaluation support
This is the same implementation as the old one.
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_pipeline.cc')
-rw-r--r-- | source/blender/draw/engines/eevee_next/eevee_pipeline.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc index fe7d02a855c..9185ce7904a 100644 --- a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc +++ b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc @@ -102,11 +102,13 @@ DRWShadingGroup *ForwardPipeline::material_opaque_add(::Material *blender_mat, G RenderBuffers &rbufs = inst_.render_buffers; DRWPass *pass = (blender_mat->blend_flag & MA_BL_CULL_BACKFACE) ? opaque_culled_ps_ : opaque_ps_; LightModule &lights = inst_.lights; + Sampling &sampling = inst_.sampling; // LightProbeModule &lightprobes = inst_.lightprobes; // RaytracingModule &raytracing = inst_.raytracing; // eGPUSamplerState no_interp = GPU_SAMPLER_DEFAULT; DRWShadingGroup *grp = DRW_shgroup_material_create(gpumat, pass); lights.bind_resources(grp); + sampling.bind_resources(grp); // DRW_shgroup_uniform_block(grp, "sampling_buf", inst_.sampling.ubo_get()); // DRW_shgroup_uniform_block(grp, "grids_buf", lightprobes.grid_ubo_get()); // DRW_shgroup_uniform_block(grp, "cubes_buf", lightprobes.cube_ubo_get()); @@ -164,18 +166,20 @@ DRWShadingGroup *ForwardPipeline::material_transparent_add(::Material *blender_m { RenderBuffers &rbufs = inst_.render_buffers; LightModule &lights = inst_.lights; + Sampling &sampling = inst_.sampling; // LightProbeModule &lightprobes = inst_.lightprobes; // RaytracingModule &raytracing = inst_.raytracing; // eGPUSamplerState no_interp = GPU_SAMPLER_DEFAULT; DRWShadingGroup *grp = DRW_shgroup_material_create(gpumat, transparent_ps_); lights.bind_resources(grp); + sampling.bind_resources(grp); // DRW_shgroup_uniform_block(grp, "sampling_buf", inst_.sampling.ubo_get()); // DRW_shgroup_uniform_block(grp, "grids_buf", lightprobes.grid_ubo_get()); // DRW_shgroup_uniform_block(grp, "cubes_buf", lightprobes.cube_ubo_get()); // DRW_shgroup_uniform_block(grp, "probes_buf", lightprobes.info_ubo_get()); // DRW_shgroup_uniform_texture_ref(grp, "lightprobe_grid_tx", lightprobes.grid_tx_ref_get()); // DRW_shgroup_uniform_texture_ref(grp, "lightprobe_cube_tx", lightprobes.cube_tx_ref_get()); - // DRW_shgroup_uniform_texture(grp, "utility_tx", inst_.pipelines.utility_tx); + DRW_shgroup_uniform_texture(grp, "utility_tx", inst_.pipelines.utility_tx); /* TODO(fclem): Make this only needed if material uses it ... somehow. */ // if (true) { // DRW_shgroup_uniform_texture_ref( |