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

Rendering Optimisations - Part 2 #415

Merged
merged 74 commits into from
Jan 28, 2023
Merged

Rendering Optimisations - Part 2 #415

merged 74 commits into from
Jan 28, 2023

Conversation

kanerogers
Copy link
Collaborator

@kanerogers kanerogers commented Jan 19, 2023

Background

Closes #259, #357, #356, #274

This is a very big PR. It touches almost all of Hotham's internals, and makes many breaking changes.

However, it also dramatically improves the performance of almost all Hotham applications. While I would have preferred to split this PR into multiple chunks, strong time pressure and the nature of inter-connected improvements made that incredibly difficult.

TODO

  • Run through the full test suite and create issues for any problems that arise
  • Test all examples on-device

@kanerogers
Copy link
Collaborator Author

It doesn't look like hotham/src/shaders/all_textures_and_ibl.frag or hotham/src/shaders/all_textures_no_ibl.frag are ever used, are they?

Nope! They're redundant - I'll kill 'em with fire.

- Remove useless exporter script
- Don't hardcode Kane's local IP address
@kanerogers
Copy link
Collaborator Author

There is dark arc on the flat area close to the spheres on the side towards the light in the normal tangents test. It looks weird and wasn't there before. Can it have anything to do with ambient occlusion? Spotlights should not be affected by ambient occlusion...

render_normal_tangent_test_Spotlight2.jpg

  • re: ambient occlusion, I had to check the spec, but you are right! That's a bug - I've created an issue for it [Bug] Don't apply ambient occlusion to direct lighting #416
  • But that's not an issue, as there's no ambient occlusion texture on that model
  • Instead I think the issue is likely related to the (significantly faster) approximations we're using for the BRDFs, particularly the diffuse term, which I've mostly lifted them from Filament. For a real world scene, I haven't noticed any discernable difference, but given that we were originally using the most accurate BRDFs we could (lifted from a model viewer, rather than a real time engine), we will absolutely see some drop in accuracy in exchange for performance.
  • I think this will always be a moving target between performance / quality. In the future it'd be good to give developers some more knobs they can tweak, but for now I believe this is an acceptable trade-off!

@kanerogers
Copy link
Collaborator Author

Strangely, clippy in CI seems to be applying more lints than on my local machine. This is very frustrating..

@kanerogers
Copy link
Collaborator Author

done

@rasmusgo
Copy link
Collaborator

The custom rendering example is broken 😬

Cargo.toml Outdated Show resolved Hide resolved
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.

[Rendering] Rendering optimisations v2
2 participants