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

Replace Model Shader with PBR Shader from gdx-gltf #71

Merged
merged 58 commits into from
Jul 15, 2022
Merged

Conversation

JamesTKhan
Copy link
Owner

@JamesTKhan JamesTKhan commented Jul 7, 2022

This PR replaces the Mundus model shader with the PBR shader by extending gdx-gltf's shader classes. Another new feature is the auto-importing of model textures and materials when importing a model. The materials are read from on import and then assigned to the models corresponding material assets.

This adds support for animations, and all the other benefits of the PBR shaders. This is still a work in progress as its quite a bit of work and issues to take into account.

  • Extend PBR Shader classes
  • Update UI to support new PBR attributes (Normal, Emissive, Metallic, Occlusion, Roughness, etc..)
  • Auto-import textures and materials from gltf file
  • Save new attributes data in meta files
  • Remove old model shader
  • Clone materials on duplication of Model objects
  • Synchronize lights between Mundus and PBR Shaders
  • [BREAKING CHANGE] Synchronize fog between Mundus and PBR Shaders
  • Investigate IBL and Mundus Skybox Pushed out for later release due to scope creep
  • Test g3d compatibility
  • Handle numBones configs, dynamically rebuild shader provider to support the model asset with highest bone count
  • Test Windows/Linux/HTML/Android
  • update CHANGES files

[BREAKING CHANGE] Synchronize fog between Mundus and PBR Shaders - Fog now has new parameters and more closely aligns with libGDX and PBR shaders. You may need to adjust fog.

[BREAKING CHANGE] The loadScene method for the runtime has changed. A ModelBatch is no longer required to be passed in.

image

Bone counts of model assets are now tracked, no more crashes for bone counts

image

@JamesTKhan JamesTKhan added the enhancement New feature or request label Jul 7, 2022
@JamesTKhan JamesTKhan linked an issue Jul 7, 2022 that may be closed by this pull request
@JamesTKhan JamesTKhan modified the milestone: 0.4.0 Release Jul 12, 2022
@JamesTKhan JamesTKhan changed the title (DRAFT) Replace Model Shader with PBR Shader from gdx-gltf Replace Model Shader with PBR Shader from gdx-gltf Jul 13, 2022
# Conflicts:
#	commons/src/main/com/mbrlabs/mundus/commons/shaders/ModelShader.java
#	commons/src/main/com/mbrlabs/mundus/commons/shaders/model.vert.glsl
#	commons/src/main/com/mbrlabs/mundus/commons/shaders/shadowmap.frag.glsl
#	editor/src/main/com/mbrlabs/mundus/editor/ui/modules/dialogs/DirectionalLightsDialog.kt
@JamesTKhan JamesTKhan marked this pull request as ready for review July 15, 2022 03:09
@JamesTKhan JamesTKhan merged commit 12ad70f into master Jul 15, 2022
@JamesTKhan JamesTKhan deleted the pbr_shader branch October 17, 2022 22:09
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
Status: Done
Development

Successfully merging this pull request may close these issues.

Replace ModelShader with PBR Shader from gdx-gltf
1 participant