浏览代码

WebGPURenderer: fix `D_BlinnPhong` (#28199)

* WebGPURenderer: fix `D_BlinnPhong`

* fix: correction
susiwen8 1 年之前
父节点
当前提交
1780cc5466
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/jsm/nodes/functions/PhongLightingModel.js

+ 1 - 1
examples/jsm/nodes/functions/PhongLightingModel.js

@@ -12,7 +12,7 @@ const G_BlinnPhong_Implicit = () => float( 0.25 );
 
 const D_BlinnPhong = tslFn( ( { dotNH } ) => {
 
-	return shininess.mul( 0.5 / Math.PI ).add( 1.0 ).mul( dotNH.pow( shininess ) );
+	return shininess.mul( float( 0.5 ) ).add( 1.0 ).mul( float( 1 / Math.PI ) ).mul( dotNH.pow( shininess ) );
 
 } );