rayzee 5.8.0 → 5.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rayzee.es.js
CHANGED
|
@@ -9434,7 +9434,7 @@ var bc = class extends wn {
|
|
|
9434
9434
|
dispose() {
|
|
9435
9435
|
this._computeNodeA?.dispose(), this._computeNodeB?.dispose(), this._storageTexA?.dispose(), this._storageTexB?.dispose(), this._colorTexNode?.dispose(), this._readTexNodeA?.dispose(), this._readTexNodeB?.dispose();
|
|
9436
9436
|
}
|
|
9437
|
-
}, Cc = /* @__PURE__ */ K("\n fn bilateralWeight(\n centerLum: f32, sLum: f32,\n centerNormal: vec3f, sNormal: vec3f,\n centerDepth: f32, sDepth: f32,\n centerColor: vec3f, sColor: vec3f,\n kernelW: f32,\n phiLum: f32, phiNorm: f32, phiDep: f32, phiCol: f32\n ) -> f32 {\n\n let lumW = exp( -abs( centerLum - sLum ) * phiLum );\n let normW = pow(
|
|
9437
|
+
}, Cc = /* @__PURE__ */ K("\n fn bilateralWeight(\n centerLum: f32, sLum: f32,\n centerNormal: vec3f, sNormal: vec3f,\n centerDepth: f32, sDepth: f32,\n centerColor: vec3f, sColor: vec3f,\n kernelW: f32,\n phiLum: f32, phiNorm: f32, phiDep: f32, phiCol: f32\n ) -> f32 {\n\n let lumW = exp( -abs( centerLum - sLum ) * phiLum );\n // clamp dot to [0,1] not just max(., 0): miss-ray normals decode to\n // non-unit (-1,-1,-1) with dot=3, which would saturate pow to +inf\n // and poison output via inf*0 = NaN. See project_tsl_pitfalls memory.\n let normW = pow( clamp( dot( centerNormal, sNormal ), 0.0, 1.0 ), phiNorm );\n let depW = exp( -abs( centerDepth - sDepth ) / max( phiDep, 0.001 ) );\n let maxDiff = max( max( abs( centerColor.x - sColor.x ),\n abs( centerColor.y - sColor.y ) ),\n abs( centerColor.z - sColor.z ) );\n let colW = exp( -maxDiff * phiCol );\n return kernelW * lumW * normW * depW * colW;\n\n }\n"), wc = class extends wn {
|
|
9438
9438
|
constructor(e, t = {}) {
|
|
9439
9439
|
super("BilateralFiltering", {
|
|
9440
9440
|
...t,
|