Fix: Dilate node uses wrong result types

The Dilate node created Color results for its intermediate separable
results, but they should actually be floats.
This commit is contained in:
Omar Emara
2024-12-05 13:44:05 +02:00
parent 839f9ba948
commit 9fcc15f8a6

View File

@@ -135,7 +135,7 @@ class DilateErodeOperation : public NodeOperation {
const Domain domain = compute_domain();
const int2 transposed_domain = int2(domain.size.y, domain.size.x);
Result horizontal_pass_result = context().create_result(ResultType::Color);
Result horizontal_pass_result = context().create_result(ResultType::Float);
horizontal_pass_result.allocate_texture(transposed_domain);
horizontal_pass_result.bind_as_image(shader, "output_img");
@@ -163,7 +163,7 @@ class DilateErodeOperation : public NodeOperation {
const Domain domain = compute_domain();
const int2 transposed_domain = int2(domain.size.y, domain.size.x);
Result horizontal_pass_result = context().create_result(ResultType::Color);
Result horizontal_pass_result = context().create_result(ResultType::Float);
horizontal_pass_result.allocate_texture(transposed_domain);
this->execute_step_pass_cpu(input, horizontal_pass_result);