Skip to content

fix: avoid nested sampler function calls in Color Curves shader#13209

Merged
jtydhr88 merged 2 commits intomasterfrom
fix/color-curves-shader-nested-sampler
Mar 28, 2026
Merged

fix: avoid nested sampler function calls in Color Curves shader#13209
jtydhr88 merged 2 commits intomasterfrom
fix/color-curves-shader-nested-sampler

Conversation

@jtydhr88
Copy link
Copy Markdown
Contributor

Split nested applyCurve(u_curve0, applyCurve(u_curve1, x)) calls into separate statements using temporary variables. Some WebGL2 GLSL compilers have a bug where nested sampler function parameters cause the outer call to incorrectly use the inner call's sampler, resulting in the curve being applied twice instead of applying two different curves.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 17a91957-755a-44b0-aef6-206c91867e7d

📥 Commits

Reviewing files that changed from the base of the PR and between b353a7c and b4156b8.

📒 Files selected for processing (2)
  • blueprints/.glsl/Color_Curves_8.frag
  • blueprints/Color Curves.json

📝 Walkthrough

Walkthrough

This pull request refactors the color curve application logic in the Color_Curves_8.frag shader and its corresponding JSON blueprint configuration. The shader now applies per-channel curves (red, green, blue) to intermediate temporary variables first, then applies the RGB master curve to each of these temporary results. Previously, the master curve was applied inline around nested channel curve calls. The evaluation sequence changes from inline computation to an explicit two-step process. No exported or public declarations were modified.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: refactoring nested sampler function calls in the Color Curves shader to avoid a WebGL2 compiler bug.
Description check ✅ Passed The description clearly explains the fix: splitting nested applyCurve calls into separate statements using temporary variables, and provides context about the WebGL2 compiler bug being addressed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jtydhr88 jtydhr88 merged commit fc1fdf3 into master Mar 28, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants