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

Clear coat #192

Merged
merged 7 commits into from
Apr 6, 2021
Merged

Clear coat #192

merged 7 commits into from
Apr 6, 2021

Conversation

TaaTT4
Copy link
Contributor

@TaaTT4 TaaTT4 commented Apr 2, 2021

The implementation is based on Filament, taking inspiration from @rujialiu preliminary work.
image
image
Differently from what Filament allows, I didn't add support neither for a clear coat layer dedicated normal map nor for base layer specular color alteration. Those two features weren't in my needs, but should be quite straightforward to add.
Another subtle thing that I didn't take in account is to discriminate the clear coat lighting contribution among standard scene rendering pass and IBL rendering pass.
For having a look at Filament implementation I suggest starting from here for direct light contribution and from here for indirect lighting contribution.

TaaTT4 added 6 commits March 31, 2021 11:58
…block load and save, Material struct additional data)
…t should be OK: as far as I know, Filament and OGRE shaders work in two different spaces)
Since OGRE allows having different light colors for the diffuse and specular component, but the clear coat Filament implementation does not, only the specular component is take in account in direct light contribution for the clear coat layer.
@darksylinc
Copy link
Member

This is something very minor:

Can I ask you that the shader files use tabs instead of spaces?
Right now the additional code uses both tabs and spaces.

@TaaTT4
Copy link
Contributor Author

TaaTT4 commented Apr 6, 2021

Can I ask you that the shader files use tabs instead of spaces?
Right now the additional code uses both tabs and spaces.

Done. Sorry, I wasn't aware there was a style convention (I've seen a lot of fighting between tabs and spaces, especially in BRDF piece file) and the code taken from Filament was using spaces.

@darksylinc darksylinc merged commit 59a5659 into OGRECave:master Apr 6, 2021
@TaaTT4 TaaTT4 deleted the feature/clear_coat branch April 6, 2021 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants