瀏覽代碼

Clean up.

Mr.doob 5 月之前
父節點
當前提交
701e16e3e3
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 1 0
      src/nodes/functions/BSDF/DFGApprox.js
  2. 4 3
      utils/generateDFGLUT.js

+ 1 - 0
src/nodes/functions/BSDF/DFGApprox.js

@@ -53,6 +53,7 @@ const DFGApprox = /*@__PURE__*/ Fn( ( { roughness, dotNV } ) => {
 	if ( lut === null ) {
 
 		lut = new DataTexture( DATA, 32, 32, RGFormat, HalfFloatType );
+		lut.name = 'DFG_LUT';
 		lut.minFilter = LinearFilter;
 		lut.magFilter = LinearFilter;
 		lut.wrapS = ClampToEdgeWrapping;

+ 4 - 3
utils/generateDFGLUT.js

@@ -1,9 +1,8 @@
 /**
- * DFG LUT Generator (32x32)
+ * DFG LUT Generator
  *
  * Generates a precomputed lookup table for the split-sum approximation
- * used in Image-Based Lighting. The 32x32 resolution provides a minimal
- * memory footprint for DataTexture usage.
+ * used in Image-Based Lighting.
  *
  * Reference: "Real Shading in Unreal Engine 4" by Brian Karis
  */
@@ -264,6 +263,7 @@ export function getDFGLUT() {
 	if ( lut === null ) {
 
 		lut = new DataTexture( DATA, ${LUT_SIZE}, ${LUT_SIZE}, RGFormat, HalfFloatType );
+		lut.name = 'DFG_LUT';
 		lut.minFilter = LinearFilter;
 		lut.magFilter = LinearFilter;
 		lut.wrapS = ClampToEdgeWrapping;
@@ -302,6 +302,7 @@ const DFGApprox = /*@__PURE__*/ Fn( ( { roughness, dotNV } ) => {
 	if ( lut === null ) {
 
 		lut = new DataTexture( DATA, ${LUT_SIZE}, ${LUT_SIZE}, RGFormat, HalfFloatType );
+		lut.name = 'DFG_LUT';
 		lut.minFilter = LinearFilter;
 		lut.magFilter = LinearFilter;
 		lut.wrapS = ClampToEdgeWrapping;

粤ICP备19079148号