Blender Git Statistics -> Developers -> mmoeller

Michael Möller (mmoeller)

Total Commits : 1
Master Commits : 1
Branch Commits : 0
First Commit : January 29, 2021
Latest Commit : January 29, 2021

Commits by Month

DateNumber of Commits
January, 20211

Favourite Files

FilenameTotal Edits
node_shader_displacement.c1

File Changes

ActionTotalPer Commit
Modified11.0

Code Changes

ActionTotalPer Commit
Lines Added11.0
Lines Removed22.0

Latest commits Feed

Revision 5d215d5 by Michael Möller / Clément Foucault (master)
January 29, 2021, 16:08 (GMT)
EEVEE: Fix GPUNodeLink memory leak for displacement nodes using SHD_SPACE_WORLD

When the displacement space is set to SHD_SPACE_WORLD, the GLSL method
"node_displacement_world" is used instead of the "node_displacement_object" method. The two GLSL methods:
```
void node_displacement_object(
float height, float midlevel, float scale, vec3 N, mat4 obmat, out vec3 result)
{
N = (vec4(N, 0.0) * obmat).xyz;
result = (height - midlevel) * scale * normalize(N);
result = (obmat * vec4(result, 0.0)).xyz;
}

void node_displacement_world(float height, float midlevel, float scale, vec3 N, out vec3 result)
{
result = (height - midlevel) * scale * normalize(N);
}
```
In contrast to the "node_displacement_object" method, the "node_displacement_world"
does not require an "obmat" parameter. Attempting to still pass "GPU_builtin(GPU_OBJECT_MATRIX)"
as additional parameter will result in a memory leak. The "GPUNodeLink" allocated in
the "GPU_builtin" method will never get released.

Fixes T83941 Memory leak when using the Displacement shader node in Eevee with the displacement
space set to "World Space"

MiikaHweb - Blender Git Statistics v1.06
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021