Plugging an Add node which adds a constant value into a Nanite Pass switch node results in derivative ops to be detected where there should be none (which show up as red in the No Derivative Ops debug visualization mode).
When the Add node is excluded from the material graph, no derivative ops are detected which is the expected behavior.
In a blank project:
1. Add a mesh into the scene and enable nanite.
2. In a newly created material, Add a Texture Sample node and plug its RGB output pin into the Emissive Color input pin on the material.
3. Add a Nanite Pass Switch node and plug its output pin into the UVs input pin of the Texture Sample node.
4. Add an "Add" node and plug the output pin into the Default input pin of the Nanite Pass Switch node.
5. Leave the B field of the Add node set to 1.0
6. Add a float value as the input for both the A input pin on the Add node and the Nanite input pin on the Nanite Pass Switch node.
7. Assign the Test material to a nanite enabled mesh in the scene.
8. Set r.Nanite.Visualize.Advanced to 1 and switch to No Derivative Ops debug visualization. The sphere will show up as red which indicates that derivative ops have been detected.
9. Open the material graph and plug the float value directly into the Default input pin on the Nanite Pass Switch node (bypassing the Add node). Leave the other connection from the float to the Nanite input pin on the Nanite Pass Switch. The mesh will appear blue in the debug viewer (no derivative ops detected).
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-254881 in the post.
0 |
Component | UE - Graphics Features |
---|---|
Target Fix | 5.6 |
Created | Mar 11, 2025 |
---|---|
Updated | Mar 12, 2025 |