mirror of
https://github.com/blender/blender
synced 2026-09-26 16:15:47 +03:00
Fix: Viewport Compositor depth has low precision
The depth pass of the Viewport Compositor has low precision if the precision of the node tree is set to Auto. To fix this, we always expose the depth pass in full precision.
This commit is contained in:
parent
e0c6db81ea
commit
8cf8b54332
1 changed files with 5 additions and 0 deletions
|
|
@ -762,6 +762,11 @@ class RenderLayerOperation : public NodeOperation {
|
|||
const int input_unit = GPU_shader_get_sampler_binding(shader, "input_tx");
|
||||
GPU_texture_bind(pass_texture, input_unit);
|
||||
|
||||
/* Depth passes always need to be stored in full precision. */
|
||||
if (GPU_texture_has_depth_format(pass_texture)) {
|
||||
result.set_precision(ResultPrecision::Full);
|
||||
}
|
||||
|
||||
const int2 compositing_region_size = context().get_compositing_region_size();
|
||||
result.allocate_texture(Domain(compositing_region_size));
|
||||
result.bind_as_image(shader, "output_img");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue