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

Viewport 2D in 3D material cleanups #493

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

Malcolmnixon
Copy link
Collaborator

@Malcolmnixon Malcolmnixon commented Aug 2, 2023

This pull request implements feature request #488 by:

  • Allowing the user to specify a custom material for the screen
  • Hide material overrides (alpha-scissor-threshold, unshaded, filtered) when using a custom material
  • In the editor, refresh the screen material every second to show material updates performed in the property editor

Additionally other changes include

  • Use a range slider for alpha_scissor_threshold to ensure [0..1] range
  • Fixed unshaded option in Godot 4 via shading_mode
  • Fixed editor tool failure when clearing scene
  • Used dirty-flags approach to updating render objects to minimize unnecessary changes

@Malcolmnixon Malcolmnixon force-pushed the viewport-material branch 2 times, most recently from f2facd7 to 84c8b3f Compare August 3, 2023 02:58
@Malcolmnixon Malcolmnixon marked this pull request as ready for review August 3, 2023 02:59
Support providing custom material property
Fix tool-script issue when clearing scene
Move properties into logical groups
@Malcolmnixon
Copy link
Collaborator Author

This method of letting the user provide their own material allows for fine control of the rendering - similar to pull request #476:

image

Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

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

lgtm, this should solve all current and future wishes around controlling the material.

We'll need to document it properly, especially that the albedo texture will always be set by us.

@BastiaanOlij BastiaanOlij added the enhancement New feature or request label Aug 5, 2023
@BastiaanOlij BastiaanOlij added this to the 4.2.0 milestone Aug 5, 2023
@surreal6
Copy link
Contributor

surreal6 commented Aug 5, 2023

Hi @Malcolmnixon i'm sorry i have no time to checkout and test it, but i read the code and this solution seems good for me, also with this it's easier to understand the viewport workflow for everyone.

You can also close my PR when you merge this 👍 Thanks!

@Malcolmnixon Malcolmnixon merged commit 9cdf19a into GodotVR:master Aug 5, 2023
2 checks passed
@Malcolmnixon Malcolmnixon deleted the viewport-material branch August 5, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants