diff --git a/package.json b/package.json index e9f6265..580c0c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@davepagurek/glsl-autodiff", - "version": "0.0.17", + "version": "0.0.18", "main": "build/autodiff.js", "author": "Dave Pagurek ", "license": "MIT", diff --git a/src/vecFunctions.ts b/src/vecFunctions.ts index aa93f8a..30d9ce3 100644 --- a/src/vecFunctions.ts +++ b/src/vecFunctions.ts @@ -241,11 +241,11 @@ VectorOp.prototype.adjustNormal = function(normal: VecParam, position: VecParam) const jacobian = new OffsetJacobian(this.ad, position, this) const dodu = new VecMult(this.ad, jacobian, u) const dodv = new VecMult(this.ad, jacobian, v) - return new Cross( + return new VecNormalize(this.ad, new Cross( this.ad, new VecSum(this.ad, u, dodu), new VecSum(this.ad, v, dodv), - ) + )) } export function WithVecFunctions(Base: T) {