Skip to content

enable PBR for lightMapping rendering and add support for physicalMap#232

Merged
illwieckz merged 8 commits intoDaemonEngine:masterfrom
illwieckz:pbr
Dec 15, 2019
Merged

enable PBR for lightMapping rendering and add support for physicalMap#232
illwieckz merged 8 commits intoDaemonEngine:masterfrom
illwieckz:pbr

Conversation

@illwieckz
Copy link
Copy Markdown
Member

@illwieckz illwieckz commented Dec 8, 2019

This PR sits above #230.

Enable PBR for lightMapping rendering, add support for physicalMap.

physicalMap expects ORM support (glTF 2.0 standard).

Test map provided by @SomaZ, I edited the shader, converted the assets and build the package the way this branch expects it:
https://dl.illwieckz.net/b/daemon/wip/pbr/map-test-pbr_0%2B20191212-075241%2B9a1edb3.dpk

I removed the swizzle mask code because as long as we don't get expected result on PBR side, we can't know if experiments with swizzles are working or not.

The PR introduces r_physicalMapping cvar, which is currently disabled by default (set to 0) since PBR is not production ready.

Some part of the PBR rendering looks OK, but the lighting is not. Fixing PBR is out of topic. This PR is about being sure assets are piped through the engine from VFS to GLSL. It would make debugging PBR far easier.

@illwieckz illwieckz force-pushed the pbr branch 3 times, most recently from 479ee41 to 86d9088 Compare December 8, 2019 15:10
@illwieckz illwieckz changed the title WIP: enable PBR for lightMapping rendering, attempt to implement some channel swizzle mask WIP: enable PBR for lightMapping rendering and add support for materialMap Dec 8, 2019
@illwieckz
Copy link
Copy Markdown
Member Author

I removed the swizzle mask code because as long as we don't get expected result on PBR side, we can't know if experiments with swizzles are working or not. The textures from test map were converted to not require such feature.

@illwieckz illwieckz force-pushed the pbr branch 5 times, most recently from 1081583 to 6891f15 Compare December 9, 2019 01:18
@illwieckz illwieckz changed the title WIP: enable PBR for lightMapping rendering and add support for materialMap enable PBR for lightMapping rendering and add support for materialMap Dec 9, 2019
@illwieckz
Copy link
Copy Markdown
Member Author

This PR is no longer WIP because remaining PBR bugs seems related to the implementation itself, not to the proposed changes made to enable it.

@illwieckz
Copy link
Copy Markdown
Member Author

I noticed the PBR compute is not done when there is no normalmap. That's something to keep in mind but that must not prevent the merge of this PR. This PR is there to make life easier to people wanting to work on the PBR part of the engine (which looks incomplete). A GLSL wizard would then just have to focus on fixing/completing GLSL code since PBR maps will be loaded right.

@illwieckz illwieckz force-pushed the pbr branch 3 times, most recently from e5442a4 to 7eedad6 Compare December 12, 2019 16:46
@illwieckz
Copy link
Copy Markdown
Member Author

This now looks ready to me. I have more revamp ideas but that would be another PR. Let's do it step by step.

@illwieckz illwieckz changed the title enable PBR for lightMapping rendering and add support for materialMap enable PBR for lightMapping rendering and add support for physicalMap Dec 12, 2019
@illwieckz
Copy link
Copy Markdown
Member Author

illwieckz commented Dec 12, 2019

I renamed materialMap to physicalMap, the material word was too much generic and was a creation introduced in e85abec (“Support materialMaps (PBS).”) and never used yet. So there is no problem to set a better name instead.

@illwieckz illwieckz added T-Improvement Improvement for an existing feature A-Renderer T-Feature-Request Proposed new feature and removed T-Improvement Improvement for an existing feature labels Dec 13, 2019
@illwieckz illwieckz force-pushed the pbr branch 3 times, most recently from bd384a1 to 1143aa0 Compare December 14, 2019 15:04
@illwieckz
Copy link
Copy Markdown
Member Author

rebased on master

@slipher
Copy link
Copy Markdown
Member

slipher commented Dec 15, 2019

looks OK

@illwieckz
Copy link
Copy Markdown
Member Author

illwieckz commented Dec 15, 2019

I just added a commit to properly route through PBR mapping if r_physicalMapping is enabled and shader is physical or, if it's not a physical map and r_specularMapping is disabled or it's not a physical map but r_specularMapping is disabled, produce something. We need to test everything…

r_physicalMapping is still disabled by default.

@illwieckz illwieckz merged commit a361a50 into DaemonEngine:master Dec 15, 2019
@illwieckz illwieckz deleted the pbr branch December 31, 2019 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants