diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-01-25 15:25:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-01-25 19:14:20 +0300 |
commit | c813a1b3583e9a3bf17c75e16995ebadb046361a (patch) | |
tree | 8f5405c7f0a05aef8d43342764fc0a42ef577a54 /source/blender/gpu/shaders/material/gpu_shader_material_point_info.glsl | |
parent | eab066cbf2da1fdb8162d9ed814a9491f9acf02d (diff) |
Cycles: add Point Info node
With (center) position, radius and random value outputs.
Eevee does not yet support rendering point clouds, but an untested
implementation of this node was added for when it does.
Ref T92573
Diffstat (limited to 'source/blender/gpu/shaders/material/gpu_shader_material_point_info.glsl')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_point_info.glsl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_point_info.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_point_info.glsl new file mode 100644 index 00000000000..d717ac97b28 --- /dev/null +++ b/source/blender/gpu/shaders/material/gpu_shader_material_point_info.glsl @@ -0,0 +1,13 @@ + +void node_point_info(out vec3 position, out float radius, out float random) +{ +#ifdef POINTCLOUD_SHADER + position = pointPosition; + radius = pointRadius; + random = wang_hash_noise(uint(pointID)); +#else + position = vec3(0.0, 0.0, 0.0); + radius = 0.0; + random = 0.0; +#endif +} |