11import { NearestFilter , Vector4 , TempNode , NodeUpdateType , PassNode } from 'three/webgpu' ;
2- import { nodeObject , Fn , float , uv , uniform , convertToTexture , vec2 , vec3 , clamp , floor , dot , smoothstep , If , sign , step , mrt , output , normalView , property } from 'three/tsl' ;
2+ import { nodeObject , Fn , float , uv , uniform , convertToTexture , vec2 , vec3 , clamp , floor , dot , smoothstep , If , sign , step , mrt , output , normalView } from 'three/tsl' ;
33
44/**
55 * A inner node definition that implements the actual pixelation TSL code.
@@ -127,7 +127,7 @@ class PixelationNode extends TempNode {
127127
128128 const depthEdgeIndicator = ( depth ) => {
129129
130- const diff = property ( ' float' , 'diff' ) ;
130+ const diff = float ( ) . toVar ( 'diff' ) ;
131131 diff . addAssign ( clamp ( sampleDepth ( 1 , 0 ) . sub ( depth ) ) ) ;
132132 diff . addAssign ( clamp ( sampleDepth ( - 1 , 0 ) . sub ( depth ) ) ) ;
133133 diff . addAssign ( clamp ( sampleDepth ( 0 , 1 ) . sub ( depth ) ) ) ;
@@ -158,7 +158,7 @@ class PixelationNode extends TempNode {
158158
159159 const normalEdgeIndicator = ( depth , normal ) => {
160160
161- const indicator = property ( ' float' , 'indicator' ) ;
161+ const indicator = float ( ) . toVar ( 'indicator' ) ;
162162
163163 indicator . addAssign ( neighborNormalEdgeIndicator ( 0 , - 1 , depth , normal ) ) ;
164164 indicator . addAssign ( neighborNormalEdgeIndicator ( 0 , 1 , depth , normal ) ) ;
@@ -173,8 +173,8 @@ class PixelationNode extends TempNode {
173173
174174 const texel = sampleTexture ( ) ;
175175
176- const depth = property ( ' float' , 'depth' ) ;
177- const normal = property ( ' vec3' , 'normal' ) ;
176+ const depth = float ( ) . toVar ( 'depth' ) ;
177+ const normal = vec3 ( ) . toVar ( 'normal' ) ;
178178
179179 If ( this . depthEdgeStrength . greaterThan ( 0.0 ) . or ( this . normalEdgeStrength . greaterThan ( 0.0 ) ) , ( ) => {
180180
@@ -183,15 +183,15 @@ class PixelationNode extends TempNode {
183183
184184 } ) ;
185185
186- const dei = property ( ' float' , 'dei' ) ;
186+ const dei = float ( ) . toVar ( 'dei' ) ;
187187
188188 If ( this . depthEdgeStrength . greaterThan ( 0.0 ) , ( ) => {
189189
190190 dei . assign ( depthEdgeIndicator ( depth ) ) ;
191191
192192 } ) ;
193193
194- const nei = property ( ' float' , 'nei' ) ;
194+ const nei = float ( ) . toVar ( 'nei' ) ;
195195
196196 If ( this . normalEdgeStrength . greaterThan ( 0.0 ) , ( ) => {
197197
0 commit comments