fix: use textureSize instead of u_resolution for texel size in blur/sharpen shaders#13347
fix: use textureSize instead of u_resolution for texel size in blur/sharpen shaders#13347
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThis PR updates several fragment shaders (GLSL files and embedded shader strings in JSON blueprints) for Image Blur, Sharpen, Unsharp Mask, and Glow. Each change removes the 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
pythongosssss
left a comment
There was a problem hiding this comment.
Looks like the Glow frag also has the same issue on line 78
Preview renders at a clamped resolution (max 1024px), so u_resolution holds the preview dimensions, not the actual image dimensions. This caused blur radius and sharpen kernel offsets to scale incorrectly, producing visibly different results between preview and backend output.
Switch to textureSize(u_image0, 0) which reflects the actual input texture dimensions regardless of render target size, consistent with how Edge-Preserving Blur already handles this correctly.