Principle Volume in World Shader is not working #80332

Closed
opened 2020-09-01 16:38:19 +02:00 by Mathias Zamęcki · 17 comments

Edit by @Alaska
Bisecting points to 6f502136c7 as the cause.


System Information:
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version:
Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: 0330d1af29
Worked: 2.83.4

Short description of error:
The principaled volume shader is not rendered by EEVEE when it is used in the world shader.

2.83.png 2.90.png
2.83 2.90

Exact steps for others to reproduce the error:

  1. Start a new scene and change the render engine to EEVEE.
  2. In the world shader, add a principaled volume node and attach it to the volume socket of the material output node.
  3. In 2.90, notice how the volume is not rendered by EEVEE while in 2.83 the volume is.

Here's a .blend file with steps 1 and 2 done:
#80332 - EEVEE missing world volume shader.blend

Edit by @Alaska Bisecting points to 6f502136c7 as the cause. --- **System Information:** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version:** Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: `0330d1af29` Worked: 2.83.4 **Short description of error:** The principaled volume shader is not rendered by EEVEE when it is used in the world shader. |![2.83.png](https://archive.blender.org/developer/F8832013/2.83.png)|![2.90.png](https://archive.blender.org/developer/F8832015/2.90.png)| | -- | -- | |2.83|2.90| **Exact steps for others to reproduce the error:** 1. Start a new scene and change the render engine to EEVEE. 2. In the world shader, add a principaled volume node and attach it to the volume socket of the material output node. 3. In 2.90, notice how the volume is not rendered by EEVEE while in 2.83 the volume is. Here's a .blend file with steps 1 and 2 done: [#80332 - EEVEE missing world volume shader.blend](https://archive.blender.org/developer/F8832020/T80332_-_EEVEE_missing_world_volume_shader.blend)

Added subscriber: @Mathias-Zamecki

Added subscriber: @Mathias-Zamecki

#80719 was marked as duplicate of this issue

#80719 was marked as duplicate of this issue

#80571 was marked as duplicate of this issue

#80571 was marked as duplicate of this issue

#80425 was marked as duplicate of this issue

#80425 was marked as duplicate of this issue

Added subscriber: @SoulMyst

Added subscriber: @SoulMyst

Worked for every daily build up until release on 31 August - then I also noticed principle volume not working in world shader but the basic volume scatter node does.

Worked for every daily build up until release on 31 August - then I also noticed principle volume not working in world shader but the basic volume scatter node does.
Member

Added subscribers: @fclem, @brecht, @Alaska

Added subscribers: @fclem, @brecht, @Alaska
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm. With both 2.90.0 release and 2.91.0 c78c425266 2020-09-01 07:02

System Information:
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2060 Super 452.06

Operating system: Linux-5.7.0-2-amd64-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce RTX 2060 Super 450.57

Bisecting points to 6f502136c7 as the cause. CC @brecht and @fclem


I had a little bit of difficultly understanding the original report, so I'll update it to something I believe is more clear.

Can confirm. With both 2.90.0 release and 2.91.0 `c78c425266` 2020-09-01 07:02 **System Information:** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 2060 Super 452.06 Operating system: Linux-5.7.0-2-amd64-x86_64-with-debian-bullseye-sid 64 Bits Graphics card: GeForce RTX 2060 Super 450.57 Bisecting points to 6f502136c7 as the cause. CC @brecht and @fclem --- I had a little bit of difficultly understanding the original report, so I'll update it to something I believe is more clear.
Member

Added subscriber: @Blenderag

Added subscriber: @Blenderag
Member

Running some quick tests show that this would fix the issue while not causing #79718 to occur again.

There may be other adverse effects from this patch that I don't know about, I'm simply not experienced enough.

diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c
index a443ec61ceb..321e2b0e9ba 100644
--- a/source/blender/draw/engines/eevee/eevee_volumes.c
+++ b/source/blender/draw/engines/eevee/eevee_volumes.c
@@ -378,7 +378,7 @@ void EEVEE_volumes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
       /* Fix principle volumetric not working with world materials. */
       ListBase gpu_grids = GPU_material_volume_grids(mat);
       LISTBASE_FOREACH (GPUMaterialVolumeGrid *, gpu_grid, &gpu_grids) {
-        DRW_shgroup_uniform_texture(grp, gpu_grid->sampler_name, e_data.dummy_missing);
+        DRW_shgroup_uniform_texture(grp, gpu_grid->sampler_name, e_data.dummy_density);
       }
 
       DRW_shgroup_call_procedural_triangles(grp, NULL, common_data->vol_tex_size[2]);
Running some quick tests show that this would fix the issue while not causing #79718 to occur again. There may be other adverse effects from this patch that I don't know about, I'm simply not experienced enough. ``` diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index a443ec61ceb..321e2b0e9ba 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -378,7 +378,7 @@ void EEVEE_volumes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) /* Fix principle volumetric not working with world materials. */ ListBase gpu_grids = GPU_material_volume_grids(mat); LISTBASE_FOREACH (GPUMaterialVolumeGrid *, gpu_grid, &gpu_grids) { - DRW_shgroup_uniform_texture(grp, gpu_grid->sampler_name, e_data.dummy_missing); + DRW_shgroup_uniform_texture(grp, gpu_grid->sampler_name, e_data.dummy_density); } DRW_shgroup_call_procedural_triangles(grp, NULL, common_data->vol_tex_size[2]); ```

This issue was referenced by 90312da85a

This issue was referenced by 90312da85ae64f86742c3c041428d6536b7202b9

This issue was referenced by f0c376a52a

This issue was referenced by f0c376a52a53db98bd8d8db3c79116f71001fb5c

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-09-03 15:51:49 +02:00

This issue was referenced by None@62482

This issue was referenced by None@62482
Member

Added subscriber: @roshit121

Added subscriber: @roshit121
Member

Added subscriber: @chippwalters

Added subscriber: @chippwalters
Sign in to join this conversation.
6 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#80332
No description provided.