Skip to content

fix: true decal fix#1285

Merged
doodlum merged 3 commits into
devfrom
basic-decal-fix-2
Jul 19, 2025
Merged

fix: true decal fix#1285
doodlum merged 3 commits into
devfrom
basic-decal-fix-2

Conversation

@doodlum
Copy link
Copy Markdown
Collaborator

@doodlum doodlum commented Jul 19, 2025

True fix for decals which should work in all instances without problems.

Summary by CodeRabbit

  • Refactor
    • Simplified the rendering process by removing explicit handling and rendering of blended decal passes.
    • Streamlined deferred rendering control flow for improved maintainability and performance.
    • Removed internal logic and data structures related to blended decal render pass caching.
    • Unified blend state settings across render targets with specific alpha blending for normals and motion vectors.
  • Bug Fixes
    • Ensured consistent rendering behavior by always invoking original rendering functions without early returns in certain scenarios.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change removes all logic and data structures related to explicit handling and caching of blended decal render passes from the codebase. It simplifies the deferred rendering control flow, eliminates the RenderBlendedDecals method, and removes associated flags, structs, and vectors used for tracking blended decal passes.

Changes

File(s) Change Summary
src/Deferred.cpp, src/Deferred.h Removed RenderBlendedDecals() function and declaration; deleted inBlendedDecals flag; simplified deferred rendering logic and control flow; unified blend state copying and alpha blending enforcement for certain render targets.
src/Hooks.cpp Removed conditional blocks caching blended decal render passes in three thunk functions; now always calls original functions unconditionally.
src/Hooks.h Removed RenderPass struct definition from the Hooks namespace.
src/State.h Removed blendedDecalRenderPasses vector member from the State class.

Sequence Diagram(s)

sequenceDiagram
    participant GameEngine
    participant Deferred
    participant Renderer

    GameEngine->>Deferred: Main_RenderWorld_Start::thunk()
    alt Shader cache enabled and world state active
        Deferred->>Deferred: StartDeferred()
    end
    Deferred->>Renderer: Call original render batches function

    GameEngine->>Deferred: Main_RenderWorld_BlendedDecals::thunk()
    alt Terrain blending enabled
        Deferred->>Deferred: Render terrain blending
    end
    Deferred->>Deferred: Set inDecals = true
    Deferred->>Renderer: Call original blended decals render function
    Deferred->>Deferred: Set inDecals = false
    Deferred->>Deferred: EndDeferred()
Loading

Possibly related PRs

Suggested reviewers

  • davo0411

Poem

A whisk of the brush, the decals are gone,
No more caching passes at the break of dawn.
Deferred flows simpler, the flags set aside,
With hooks now unburdened, the renderers glide.
In code fields I hop, with joy I declare—
Cleaner and leaner, the world’s now more fair!
🐇✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb922d2 and 71aa287.

⛔ Files ignored due to path filters (1)
  • package/Shaders/Effect.hlsl is excluded by !**/*.hlsl
📒 Files selected for processing (1)
  • src/Deferred.cpp (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 19, 2025

Using provided base ref: 0ac3fba
Using base ref: 0ac3fba
Base commit date: 2025-07-18T16:09:57+01:00 (Friday, July 18, 2025 04:09 PM)

Actionable Suggestions

  • Hair Specular: Action required; Needs version bump to 1-0-1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 19, 2025

✅ A pre-release build is available for this PR:
Download

doodlum and others added 2 commits July 19, 2025 15:39
Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.
@doodlum doodlum changed the title fix: basic decal fix fix: true decal fix Jul 19, 2025
@doodlum doodlum merged commit 152912b into dev Jul 19, 2025
16 of 17 checks passed
alandtse pushed a commit to alandtse/open-shaders that referenced this pull request Jul 20, 2025
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@alandtse alandtse deleted the basic-decal-fix-2 branch February 6, 2026 05:20
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