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

[3D] Unify some some shader code #58114

Merged
merged 5 commits into from
Jul 18, 2024
Merged

Commits on Jul 18, 2024

  1. qgsphongtexturedmaterialsettings: Use default.vert vertex

    There is no need to define a special vertex shader code for this
    material, it can use the default case. This way, it reduces the number
    of vertex shader files.
    ptitjano committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    a8e2cdb View commit details
    Browse the repository at this point in the history
  2. qgsphongmaterialsettings: Use default vertex for the constant case

    There is no need to define a special vertex shader code for this
    material, it can use the default case. This way, it reduces the number
    of vertex shader files.
    ptitjano committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    ca184d9 View commit details
    Browse the repository at this point in the history
  3. qgsmetalroughmaterial: Move add addDefinesToShaderCode to Qgs3DUtils

    This will be used by `QgsPhongMaterialSettings` in the next commit.
    ptitjano committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    e8aa60b View commit details
    Browse the repository at this point in the history
  4. qgsphongmaterialsettings: Merge datadefined and constant cases

    This commit makes two changes to `QgsPhongMaterialSettings`:
    1. It merges `dataDefinedMaterial()` and `constantColorMaterial` into
    one new function: `buildMaterial`.
    
    2. The fragment shader files `phongDataDefined.frag` and
    `phongConstant.frag` are merged into a new file `phong.frag`. This is
    achieved by a `#define` logic. If `DATA_DEFINED` is defined, this is
    the dataDefined case. Otherwise, this is the constant case.
    ptitjano committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    c0612d5 View commit details
    Browse the repository at this point in the history
  5. qgsgoochmaterialsettings: Merge datadefined and constant cases

    This is similar to the previous QgsPhongMaterialSettings change:
    
    This commit makes two changes to `QgsGoochMaterialSettings`:
    1. It merges `dataDefinedMaterial()` and `constantColorMaterial` into
    one new function: `buildMaterial`.
    
    2. There is one fragment shader file called `gooch.frag`. This is
    achieved by a `#define` logic. If `DATA_DEFINED` is defined, this is
    the dataDefined case. Otherwise, this is the constant case.
    ptitjano committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    000e4e9 View commit details
    Browse the repository at this point in the history