rayzee 5.10.0 → 5.10.2
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 +156 -150
- package/dist/rayzee.es.js.map +1 -1
- package/dist/rayzee.umd.js +17 -17
- package/dist/rayzee.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/EngineDefaults.js +1 -1
- package/src/Passes/OIDNDenoiser.js +2 -2
- package/src/TSL/PathTracerCore.js +24 -3
package/package.json
CHANGED
package/src/EngineDefaults.js
CHANGED
|
@@ -440,7 +440,7 @@ export const DEFAULT_TEXTURE_MATRIX = [ 0, 0, 1, 1, 0, 0, 0, 1 ];
|
|
|
440
440
|
export const FINAL_RENDER_CONFIG = {
|
|
441
441
|
maxSamples: 30, bounces: 20, transmissiveBounces: 8, samplesPerPixel: 1,
|
|
442
442
|
renderMode: 1, enableAlphaShadows: true, tiles: 3, tilesHelper: true,
|
|
443
|
-
enableOIDN: true, oidnQuality: '
|
|
443
|
+
enableOIDN: true, oidnQuality: 'balance',
|
|
444
444
|
interactionModeEnabled: false,
|
|
445
445
|
};
|
|
446
446
|
|
|
@@ -52,8 +52,8 @@ const MODEL_CONFIG = {
|
|
|
52
52
|
BASE_URL: 'https://cdn.jsdelivr.net/npm/denoiser/tzas/',
|
|
53
53
|
// clean-aux models — first-hit albedo/normal are deterministic per pixel
|
|
54
54
|
QUALITY_MODELS: {
|
|
55
|
-
fast: '
|
|
56
|
-
balance: '
|
|
55
|
+
fast: 'rt_hdr_alb_nrm_small',
|
|
56
|
+
balance: 'rt_hdr_alb_nrm',
|
|
57
57
|
high: 'rt_hdr_calb_cnrm_large'
|
|
58
58
|
},
|
|
59
59
|
DEFAULT_OPTIONS: {
|
|
@@ -608,6 +608,10 @@ export const Trace = Fn( ( [
|
|
|
608
608
|
const objectID = float( - 1000.0 ).toVar();
|
|
609
609
|
const firstHitPoint = ray.origin.toVar();
|
|
610
610
|
const firstHitDistance = float( 1e10 ).toVar();
|
|
611
|
+
// OIDN clean-aux: extend albedo/normal capture through specular/transmissive
|
|
612
|
+
// surfaces so aux features describe what's actually visible (e.g. scenery
|
|
613
|
+
// behind glass), not the glass surface itself.
|
|
614
|
+
const auxLocked = tslBool( false ).toVar();
|
|
611
615
|
|
|
612
616
|
// Medium stack for transmission (per-slot IOR, slots 1-3 for nested media, depth 0 = air)
|
|
613
617
|
const mediumStackDepth = int( 0 ).toVar();
|
|
@@ -1148,14 +1152,31 @@ export const Trace = Fn( ( [
|
|
|
1148
1152
|
|
|
1149
1153
|
} );
|
|
1150
1154
|
|
|
1151
|
-
//
|
|
1155
|
+
// firstHitPoint / firstHitDistance reflect the actual primary-ray hit
|
|
1156
|
+
// (used for depth + temporal reprojection — must not skip transparent surfaces)
|
|
1152
1157
|
If( bounceIndex.equal( int( 0 ) ).and( hitInfo.didHit ), () => {
|
|
1153
1158
|
|
|
1159
|
+
firstHitPoint.assign( hitInfo.hitPoint );
|
|
1160
|
+
firstHitDistance.assign( hitInfo.dst );
|
|
1161
|
+
|
|
1162
|
+
} );
|
|
1163
|
+
|
|
1164
|
+
// objectNormal / objectColor / objectID feed OIDN's aux inputs. Overwrite
|
|
1165
|
+
// at each bounce until we land on a non-specular surface, then lock.
|
|
1166
|
+
// Falls back to the last specular hit if the path never hits diffuse.
|
|
1167
|
+
If( auxLocked.not().and( hitInfo.didHit ), () => {
|
|
1168
|
+
|
|
1154
1169
|
objectNormal.assign( N );
|
|
1155
1170
|
objectColor.assign( material.color.xyz );
|
|
1156
1171
|
objectID.assign( float( hitInfo.materialIndex ) );
|
|
1157
|
-
|
|
1158
|
-
|
|
1172
|
+
|
|
1173
|
+
const isMirror = material.metalness.greaterThan( 0.7 ).and( material.roughness.lessThan( 0.3 ) );
|
|
1174
|
+
const isTransmissive = material.transmission.greaterThan( 0.5 );
|
|
1175
|
+
If( isMirror.or( isTransmissive ).not(), () => {
|
|
1176
|
+
|
|
1177
|
+
auxLocked.assign( tslBool( true ) );
|
|
1178
|
+
|
|
1179
|
+
} );
|
|
1159
1180
|
|
|
1160
1181
|
} );
|
|
1161
1182
|
|