Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the editor native shader source visualizer #89690

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Mar 19, 2024

  • Use CodeEdit to enable features such as line numbers and minimap.
  • Enable syntax highlighting.
  • Use a fixed-width font.
  • Use the script editor settings.

The native shader source visualizer is the option from this dropdown:

inspector_option

Performance (in terms of the time it takes for the dialog to open) is roughly the same as before.

Preview

Before

Before

After

After

Copy link
Member

@Geometror Geometror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! (The visualizer even opens up more quickly for me, at least in debug mode (21s -> 16s). Code looks fine too.

- Use CodeEdit to enable features such as line numbers and minimap.
- Enable syntax highlighting.
- Use a fixed-width font.
- Use the script editor settings.
@Calinou Calinou force-pushed the editor-improve-native-shader-inspector branch from 07682d4 to 44de95e Compare March 21, 2024 23:17
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 23, 2024
@akien-mga akien-mga closed this pull request by merging all changes into godotengine:master in 06abc86 Mar 24, 2024
akien-mga added a commit that referenced this pull request Mar 24, 2024
…nspector

Improve the editor native shader source visualizer
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the editor-improve-native-shader-inspector branch March 24, 2024 16:42

// Colorize preprocessor statements.
const Color user_type_color = EDITOR_GET("text_editor/theme/highlighting/user_type_color");
syntax_highlighter->add_color_region("#", "", user_type_color, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have #85014 merged, should we add a syntax_highlighter->set_uint_suffix_enabled() here too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, feel free to open a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants