You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some functions (e.g. mix or even tan) can define their derivatives based on the derivatives of other existing ops. We don't want to fully define these using existing ops, though, because we still want our outputted GLSL to use more optimized functions where available (the tan op should use tan(x) instead of sin(x)/cos(x) for its definition even if the derivative is defined using other ops.) To accommodate this, we could have an internal derivative creator system:
class Tan extends Op {
derivative(param: Param) {
return createDerivative((d) => d.sin().div(d.cos())).gen(param)
}
// ...etc
}
The text was updated successfully, but these errors were encountered:
Some functions (e.g.
mix
or eventan
) can define their derivatives based on the derivatives of other existing ops. We don't want to fully define these using existing ops, though, because we still want our outputted GLSL to use more optimized functions where available (thetan
op should usetan(x)
instead ofsin(x)/cos(x)
for its definition even if the derivative is defined using other ops.) To accommodate this, we could have an internal derivative creator system:The text was updated successfully, but these errors were encountered: