Skip to content

Commit 827a421

Browse files
committed
Clean up.
1 parent d71fc38 commit 827a421

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/webgpu_loader_materialx.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@
123123

124124
const gridXZ = Fn( ( [ gridSize = float( 1.0 ), dotWidth = float( 0.1 ), lineWidth = float( 0.02 ) ] ) => {
125125

126-
const worldPos = positionWorld;
127-
const coord = worldPos.xz.div( gridSize );
126+
const coord = positionWorld.xz.div( gridSize );
128127
const grid = fract( coord );
129128

130129
// Screen-space derivative for automatic antialiasing
@@ -135,7 +134,7 @@
135134
const squareDist = max( abs( grid.x.sub( 0.5 ) ), abs( grid.y.sub( 0.5 ) ) );
136135
const dots = smoothstep( dotWidth.add( smoothing ), dotWidth.sub( smoothing ), squareDist );
137136

138-
// Create grid lines with derivative-based antialiasing
137+
// Create grid lines
139138
const lineX = smoothstep( lineWidth.add( smoothing ), lineWidth.sub( smoothing ), abs( grid.x.sub( 0.5 ) ) );
140139
const lineZ = smoothstep( lineWidth.add( smoothing ), lineWidth.sub( smoothing ), abs( grid.y.sub( 0.5 ) ) );
141140
const lines = max( lineX, lineZ );

0 commit comments

Comments
 (0)