Skip to content

Commit b284a8b

Browse files
fix: make backfacing shadeop indicate backfacing shader-global is needed (#1827)
The backfacing shadeop now directly accesses the backfacing field on the shader globals rather than calculating it from N and I. This updates the shader-globals-needed query to reflect that change. Signed-off-by: Stephen Friedman <sfriedma@pixar.com>
1 parent ba775bf commit b284a8b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/liboslexec/runtimeoptimize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,8 +3348,7 @@ RuntimeOptimizer::run()
33483348
m_unknown_closures_needed = true;
33493349
}
33503350
} else if (op.opname() == u_backfacing) {
3351-
m_globals_needed.insert(u_N);
3352-
m_globals_needed.insert(u_I);
3351+
m_globals_needed.insert(u_backfacing);
33533352
} else if (op.opname() == u_calculatenormal) {
33543353
m_globals_needed.insert(u_flipHandedness);
33553354
} else if (op.opname() == u_getattribute) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Need 2 globals: I N
1+
Need 1 globals: backfacing
22
Need 2 globals: P flipHandedness

0 commit comments

Comments
 (0)