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

Add a project setting to control BaseMaterial3D parallax mapping quality in a global manner #2455

Open
Tracked by #56333
Calinou opened this issue Mar 12, 2021 · 0 comments

Comments

@Calinou
Copy link
Member

Calinou commented Mar 12, 2021

Describe the project you are working on

The Godot editor 🙂

Describe the problem or limitation you are having in your project

Parallax mapping is either always enabled or always disabled in a given material. This is problematic for low-end setups as parallax mapping is a demanding feature, especially when "deep parallax" is enabled.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

There should be a way to globally disable parallax mapping to improve performance on low-end devices. For mid-range devices, we can also allow using non-"deep parallax" materials but make "deep parallax" materials fall back to non-"deep parallax".

When falling back from "deep parallax" to non-"deep parallax", we will also need to decrease the parallax mapping intensity as non-deep parallax doesn't handle steep height changes well.
Edit: Fixed in master by godotengine/godot#50383.

This proposal does not impact materials that have parallax mapping disabled.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Add a project setting that allows globally controlling the parallax mapping quality with three possible values:

  • None: Disables parallax mapping in all materials (default on mobile).
  • Simple Parallax Only: Keep parallax mapping settings as-is for materials that use non-"deep parallax". For materials with "deep parallax" enabled, disable it and decrease the parallax scale factor (see below).
  • Simple Parallax + Deep Parallax: Keep parallax mapping settings as-is (existing behavior, default on desktop).

If this enhancement will not be used often, can it be worked around with a few lines of script?

This can be implemented by an add-on. However, it's not exactly simple to make it work for all scenes with minimal intervention, especially if materials are created or loaded at run-time.

Is there a reason why this should be core and not an add-on in the asset library?

This is about improving performance on low-end devices such as integrated graphics and mobile/web platforms.

@Calinou Calinou changed the title Add a project setting to control parallax mapping quality Add a project setting to control parallax mapping quality in a global manner Mar 12, 2021
@Calinou Calinou added this to the 4.x milestone Sep 27, 2021
@Calinou Calinou changed the title Add a project setting to control parallax mapping quality in a global manner Add a project setting to control BaseMaterial3D parallax mapping quality in a global manner Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant