From a302dc88b7e592290d5b93e09d4370cbe9752d7b Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Tue, 4 Nov 2025 10:51:39 +0800 Subject: [PATCH] [issue] fix a crash when use the gabor texture node, decrease the call stack in kong --- paint/sources/material_nodes/gabor_texture_node.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paint/sources/material_nodes/gabor_texture_node.ts b/paint/sources/material_nodes/gabor_texture_node.ts index 7409b079..e7bf6d28 100644 --- a/paint/sources/material_nodes/gabor_texture_node.ts +++ b/paint/sources/material_nodes/gabor_texture_node.ts @@ -35,9 +35,11 @@ fun tex_gabor(co: float3, scale: float, frequency: float, anisotropy: float, ori var r: float3 = b - fp + h; \ var dir: float3 = normalize(orientation); \ if (anisotropy < 1.0) { \ - var hr: float = gabor_hash1(ip + b + float3(2.2, 2.2, 2.2)); \ + var hr_p: float3 = ip + b + float3(2.2, 2.2, 2.2);\ + var hr: float = gabor_hash1(hr_p); \ if (hr > anisotropy) { \ - dir = gabor_random_unit_vector(ip + b + float3(3.3, 3.3, 3.3)); \ + var dir_p: float3 = ip + b + float3(3.3, 3.3, 3.3);\ + dir = gabor_random_unit_vector(dir_p); \ } \ } \ var dot_rd: float = dot(r, dir); \