We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99d705f commit 80ba01cCopy full SHA for 80ba01c
examples/jsm/nodes/materials/NodeMaterial.js
@@ -199,7 +199,7 @@ class NodeMaterial extends ShaderMaterial {
199
if ( this.flatShading === true ) {
200
201
const fdx = dFdx( positionView );
202
- const fdy = dFdy( positionView.negate() ); // use -positionView ?
+ const fdy = dFdy( positionView );
203
const normalNode = fdx.cross( fdy ).normalize();
204
205
stack.assign( transformedNormalView, normalNode );
examples/jsm/renderers/webgpu/nodes/WGSLNodeBuilder.js
@@ -58,7 +58,7 @@ const wgslTypeLib = {
58
59
const wgslMethods = {
60
dFdx: 'dpdx',
61
- dFdy: 'dpdy',
+ dFdy: '- dpdy',
62
mod: 'threejs_mod',
63
lessThanEqual: 'threejs_lessThanEqual',
64
inversesqrt: 'inverseSqrt'
0 commit comments