diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-17 14:31:39 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-17 14:38:42 +0300 |
commit | 2bb788d4cd928971979473e22223f86b418a4f34 (patch) | |
tree | 651e098125f1966e30b3a3b44093db51a18a458f /source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl | |
parent | 52669dda8049e05eaf0bc8147ef477a05c3717da (diff) |
Cleanup: Eevee: Remove custom volumetric matrix
This was the same as using the inverse obmat.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl b/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl index 0164a04c64b..052fdbb43a2 100644 --- a/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl @@ -5,7 +5,6 @@ #define NODETREE_EXEC #ifdef MESH_SHADER -uniform mat4 volumeObjectMatrix; uniform vec3 volumeOrcoLoc; uniform vec3 volumeOrcoSize; #endif @@ -33,9 +32,9 @@ void main() vec3 ndc_cell = volume_to_ndc((vec3(volume_cell) + volJitter.xyz) * volInvTexSize.xyz); viewPosition = get_view_space_from_depth(ndc_cell.xy, ndc_cell.z); - worldPosition = transform_point(ViewMatrixInverse, viewPosition); + worldPosition = point_view_to_world(viewPosition); #ifdef MESH_SHADER - volumeObjectLocalCoord = transform_point(volumeObjectMatrix, worldPosition); + volumeObjectLocalCoord = point_world_to_object(worldPosition); volumeObjectLocalCoord = (volumeObjectLocalCoord - volumeOrcoLoc + volumeOrcoSize) / (volumeOrcoSize * 2.0); |