Skip to content

style(ui): align perf overlay stats and remove bloat options#1212

Merged
alandtse merged 2 commits into
community-shaders:devfrom
Pentalimbed:overlay-edit
Jun 29, 2025
Merged

style(ui): align perf overlay stats and remove bloat options#1212
alandtse merged 2 commits into
community-shaders:devfrom
Pentalimbed:overlay-edit

Conversation

@Pentalimbed
Copy link
Copy Markdown
Collaborator

@Pentalimbed Pentalimbed commented Jun 29, 2025

image

Summary by CodeRabbit

  • New Features

    • Improved the performance overlay with a cleaner UI, including structured tables for FPS and draw call information.
    • Added clear toggles for displaying frametime graphs before and after frame generation.
  • Refactor

    • Simplified performance overlay settings by removing separate FPS and frametime display options, focusing on frametime graph toggles.
    • Enhanced visual presentation with table layouts and separators for better readability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 29, 2025

Walkthrough

The changes simplify the performance overlay configuration by removing separate FPS and frametime display flags, consolidating options to only frametime graph toggles. The FPS and draw calls displays are refactored to use consistent ImGui table layouts, and the settings UI is streamlined to match the updated configuration logic.

Changes

File(s) Change Summary
src/Menu.cpp Removed individual FPS/frametime display flags, refactored FPS and draw calls display to use tables, simplified settings UI, updated overlay logic to match new configuration.
src/Menu.h Removed four boolean flags from PerfOverlaySettings struct, leaving only frametime graph toggles.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Menu
    participant ImGui

    User->>Menu: Open Performance Overlay
    Menu->>ImGui: Render FPS Table (raw + post-FG if active)
    Menu->>ImGui: Render Frametime Graph(s) (pre/post-FG if toggled)
    Menu->>ImGui: Render Draw Calls Table
    User->>Menu: Open Overlay Settings
    Menu->>ImGui: Show Frametime Graph Toggles Only
Loading

Possibly related PRs

  • feat: performance overlay #1070: Introduced the original performance overlay feature, including FPS and draw calls display, which this PR refactors and simplifies.

Poem

A rabbit peeks at overlays anew,
With graphs and tables—clearer view!
FPS and draw calls, neat and bright,
Frametime graphs now toggle right.
Simpler menus, less to choose—
Easier stats for all to use!
🐇✨


📜 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 a23a89b and 3a7dc9d.

📒 Files selected for processing (1)
  • src/Menu.cpp (7 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: alandtse
PR: doodlum/skyrim-community-shaders#0
File: :0-0
Timestamp: 2025-06-24T07:17:36.604Z
Learning: When reviewing PRs, always clarify the scope if there are multiple related features or dependencies. WeatherPicker was a separate PR that was already merged, while this PR focuses specifically on WetnessEffects climate preset system enhancements.
src/Menu.cpp (1)
Learnt from: davo0411
PR: doodlum/skyrim-community-shaders#1070
File: src/State.cpp:79-83
Timestamp: 2025-05-30T11:44:15.542Z
Learning: In the Skyrim Community Shaders project, the `smoothDrawCalls` array in the `State` class is declared as type `double` in `src/State.h`, which is the correct floating-point type for performing exponential moving average smoothing calculations.
🧬 Code Graph Analysis (1)
src/Menu.cpp (3)
src/Menu.h (8)
  • settings (222-222)
  • settings (223-223)
  • settings (277-277)
  • settings (278-278)
  • settings (279-279)
  • settings (282-282)
  • settings (283-283)
  • settings (285-285)
src/FrameAnnotations.cpp (1)
  • state (224-231)
include/ENB/ENBSeriesAPI.h (2)
  • state (143-146)
  • state (143-143)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build plugin and addons
🔇 Additional comments (8)
src/Menu.cpp (8)

1778-1779: LGTM! Simplified graph detection logic.

The change correctly consolidates graph detection to only consider the graph flags, removing dependency on the removed FPS/frametime display flags. This aligns well with the PR objective of simplifying the overlay configuration.


1847-1849: Good visual organization improvement.

The added separators around the draw calls section improve the visual structure and readability of the performance overlay.


2023-2040: Excellent improvement to FPS display presentation.

The refactoring to always use table format provides much better alignment and visual consistency. The conditional logic for frame generation state is handled correctly, and the labeling is clear and appropriate.


2043-2043: Simplified graph display logic is much cleaner.

Removing the dependency on separate FPS/frametime display flags and checking only the graph flag simplifies the logic and reduces configuration complexity.


2081-2081: Consistent simplification for post-FG graph display.

The condition correctly checks only the graph flag and frame generation state, maintaining consistency with the pre-FG graph logic.


2061-2061: Proper responsive sizing maintained.

The graph height calculation correctly scales with the text scale setting, maintaining UI consistency.


2139-2183: Excellent refactoring to structured table format.

The draw calls display has been significantly improved by switching from a simple text list to a proper table structure with headers. This provides much better visual organization and alignment. The implementation correctly:

  • Sets up proper column structure with fixed-width for consistency
  • Includes descriptive headers
  • Covers all relevant shader types
  • Uses proper table navigation with TableNextColumn()
  • Maintains correct begin/end pairing

This change greatly enhances the readability and professional appearance of the performance overlay.


2280-2281: Perfect simplification of settings UI.

The streamlined settings interface successfully removes configuration bloat by focusing only on the essential graph toggle options. The conditional display based on frame generation state provides a clean, context-appropriate user experience that aligns perfectly with the PR objectives.

✨ 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

Using provided base ref: 82b151f
Using base ref: 82b151f
Base commit date: 2025-06-28T19:33:32-07:00 (Saturday, June 28, 2025 07:33 PM)
No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 29, 2025

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

Comment thread src/Menu.cpp
Comment thread src/Menu.cpp Outdated
@alandtse alandtse merged commit 8ba2a74 into community-shaders:dev Jun 29, 2025
15 checks passed
alandtse pushed a commit to alandtse/open-shaders that referenced this pull request Jul 20, 2025
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.

3 participants