Skip to content

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

Open
@Calinou

Description

@Calinou

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions