AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX

Graph Editor / Viewer: Value changes do not update if shader recompile is required

Open
#1,394 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
451
Avg merge
6d 6h
Merged PRs (30d)
5

Description

Changes to input values which actually are topological changes which require the shader to be rebuilt are not caught -- resulting
in the appearance of not working. Value changes currently directly modify shader inputs for efficiency.

This does not necessarily apply to all backend targets but any that call C++ to generate new code such as conditionals.
Enumerants also will fall into this category if a single choice is encoded when generating (e.g. such as image node texture addressing.
Value changes which affect transparent display may also not be caught.

e.g. is a graph with a switch node where a change in the `which` selection input will result in nothing updating.
```xml














```

if the condition is being fed by an interface input, then changes at the interface level which affect a conditional should be considered, though a full downstream traversal could be "expensive" at least the first level interface should work.
e.g.
![image](https://github.com/AcademySoftwareFoundation/MaterialX/assets/49369885/e6edcde7-c058-4fbf-a4c8-2feefee48d21)
which would be this graph:
```xml























```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the Graph Editor/Viewer with the provided switch-node and conditional-graph XML examples, then trace how input value changes are handled when shader regeneration is required. Verify the behavior across affected backend targets, including enumerants, transparent-display changes, and first-level interface inputs; done means the displayed result updates after each relevant change.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.