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

Material compiler v2 #447

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Material compiler v2 #447

wants to merge 2 commits into from

Conversation

sunho
Copy link
Contributor

@sunho sunho commented Feb 12, 2023

Description

Very rough draft that shows new IR interface with POC insert_subdag, dead_strip, subexpression_elimination implementation.

It introduces "Value" abstraction that tries to solve multiple issues:

  • Now don't have to maintain "children" array even if the node will not ever have children list
  • Proper hashing of "normal mapped" subtree; by having normal "Value" inside all bsdf node if bsdf uses different normal, the hash of subtree will be different
  • Arbitrary subexpression elimination can remove unnecessary texture prefetch or normal precomputation without need of separate pass (just typical subexpression elimination will remove it since hash is same)
  • Open up possibility of supporting arbitrary expression (not major point but nice to have)

TODO list:

  • Make code compile
  • Testing infrastructure
  • Logging support
  • Port mitsuaba frontend
  • Implement VM backend (possibly in HLSL)

@sunho sunho marked this pull request as draft February 12, 2023 03:00
@sunho sunho marked this pull request as ready for review February 19, 2023 03:05
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.

1 participant