rayzee 7.6.0 → 7.7.0
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/README.md +1 -1
- package/dist/rayzee.es.js +104 -105
- package/dist/rayzee.es.js.map +1 -1
- package/dist/rayzee.umd.js +3 -3
- package/dist/rayzee.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/Processor/ShaderBuilder.js +0 -3
- package/src/Stages/PathTracer.js +0 -3
- package/src/TSL/FinalWriteKernel.js +5 -2
package/package.json
CHANGED
|
@@ -18,7 +18,6 @@ export class ShaderBuilder {
|
|
|
18
18
|
|
|
19
19
|
// Previous-frame texture nodes (sample from MRT RenderTarget)
|
|
20
20
|
this.prevColorTexNode = null;
|
|
21
|
-
this.prevNormalDepthTexNode = null;
|
|
22
21
|
this.prevAlbedoTexNode = null;
|
|
23
22
|
|
|
24
23
|
// Scene texture nodes cache (for in-place updates on model change)
|
|
@@ -104,7 +103,6 @@ export class ShaderBuilder {
|
|
|
104
103
|
// Previous-frame texture nodes — initialized from readTarget textures
|
|
105
104
|
const readTextures = storageTextures.getReadTextures();
|
|
106
105
|
this.prevColorTexNode = texture( readTextures.color );
|
|
107
|
-
this.prevNormalDepthTexNode = texture( readTextures.normalDepth );
|
|
108
106
|
this.prevAlbedoTexNode = texture( readTextures.albedo );
|
|
109
107
|
|
|
110
108
|
const createArrayPlaceholder = () => {
|
|
@@ -156,7 +154,6 @@ export class ShaderBuilder {
|
|
|
156
154
|
dispose() {
|
|
157
155
|
|
|
158
156
|
this.prevColorTexNode = null;
|
|
159
|
-
this.prevNormalDepthTexNode = null;
|
|
160
157
|
this.prevAlbedoTexNode = null;
|
|
161
158
|
this._sceneTextureNodes = null;
|
|
162
159
|
|
package/src/Stages/PathTracer.js
CHANGED
|
@@ -200,7 +200,6 @@ export class PathTracer extends PathTracerStage {
|
|
|
200
200
|
if ( this.shaderBuilder.prevColorTexNode ) {
|
|
201
201
|
|
|
202
202
|
this.shaderBuilder.prevColorTexNode.value = readTextures.color;
|
|
203
|
-
this.shaderBuilder.prevNormalDepthTexNode.value = readTextures.normalDepth;
|
|
204
203
|
this.shaderBuilder.prevAlbedoTexNode.value = readTextures.albedo;
|
|
205
204
|
|
|
206
205
|
}
|
|
@@ -570,7 +569,6 @@ export class PathTracer extends PathTracerStage {
|
|
|
570
569
|
this._wfMaxRayCount.value = maxRays;
|
|
571
570
|
|
|
572
571
|
const prevColor = this.shaderBuilder.prevColorTexNode;
|
|
573
|
-
const prevND = this.shaderBuilder.prevNormalDepthTexNode;
|
|
574
572
|
const prevAlbedo = this.shaderBuilder.prevAlbedoTexNode;
|
|
575
573
|
const writeTex = this.storageTextures.getWriteTextures();
|
|
576
574
|
|
|
@@ -885,7 +883,6 @@ export class PathTracer extends PathTracerStage {
|
|
|
885
883
|
cameraIsMoving: this.cameraIsMoving,
|
|
886
884
|
transparentBackground: this.transparentBackground,
|
|
887
885
|
prevAccumTexture: prevColor,
|
|
888
|
-
prevNormalDepthTexture: prevND,
|
|
889
886
|
prevAlbedoTexture: prevAlbedo,
|
|
890
887
|
renderWidth: this._wfRenderWidth,
|
|
891
888
|
renderHeight: this._wfRenderHeight,
|
|
@@ -32,7 +32,7 @@ export function buildFinalWriteKernel( params ) {
|
|
|
32
32
|
resolution, frame,
|
|
33
33
|
enableAccumulation, hasPreviousAccumulated, accumulationAlpha, cameraIsMoving,
|
|
34
34
|
transparentBackground,
|
|
35
|
-
prevAccumTexture,
|
|
35
|
+
prevAccumTexture, prevAlbedoTexture,
|
|
36
36
|
renderWidth, renderHeight,
|
|
37
37
|
visMode,
|
|
38
38
|
// Aux MRT (normalDepth + albedo) feeds only the denoiser/OIDN. Gated by a live uniform (1 = denoiser
|
|
@@ -80,7 +80,10 @@ export function buildFinalWriteKernel( params ) {
|
|
|
80
80
|
finalColor.assign( mix( prevAccumSample.xyz, sampleColor.xyz, accumulationAlpha ) );
|
|
81
81
|
If( auxOn, () => {
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
// Albedo averages cleanly (it's a colour). The NORMAL must NOT: averaging jittered
|
|
84
|
+
// unit normals collapses toward the flat geometric mean (worse at distance), which made
|
|
85
|
+
// OIDN smooth bump detail away. Keep this frame's point-sampled normal — it varies with
|
|
86
|
+
// the bump, which is exactly what OIDN's edge-stop needs to preserve it.
|
|
84
87
|
finalAlbedo.assign( mix( texture( prevAlbedoTexture, prevUV, 0 ).xyz, finalAlbedo, accumulationAlpha ) );
|
|
85
88
|
|
|
86
89
|
} );
|