davepagurek / glsl-autodiff

Tired of doing math to get normals in your vertex shader? Same.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use proper reference counting to determine the need of temp variables

davepagurek opened this issue · comments

Right now, we store an op in a temp variable if it is used by more than one other op (we are doing dependency counting). However, that op may internally need to reference it more than once. If we use proper reference counting, those cases should trigger a temporary variable's creation.