Parcourir la source

WebGLRenderer.precision: Update docs (#24161)

* WebGLRenderer.precision: Update docs

The original link links to a page that seems to have been expanded a lot. I tried to update it to be more specific for the latest versions of the docs.

Original archived page seems to be this one:
https://web.archive.org/web/20190323030114/https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices

>Using highp precision in fragment shaders will prevent your content from working on some older mobile hardware. You can use mediump instead, but be aware that this often results in corrupted rendering due to lack of precision on most mobile devices, and the corruption is not going to be visible on a typical desktop computer. In general, only using highp in both vertex and fragment shaders is safer unless shaders are thoroughly tested on a variety of platforms. Starting in Firefox 11, the WebGL getShaderPrecisionFormat() function is implemented, allowing you to check if highp precision is supported, and more generally letting you query the actual precision of all supported precision qualifiers.

* Remove note on WebGL `highp` precision

* Remove note on WebGL highp precision

Co-authored-by: Michael Herzog <[email protected]>
Nils Henrik Hals il y a 3 ans
Parent
commit
b1207a1c02

+ 1 - 2
docs/api/en/renderers/WebGLRenderer.html

@@ -33,8 +33,7 @@
 		Default is null.<br />
 
 		[page:String precision] - Shader precision. Can be `"highp"`, `"mediump"` or `"lowp"`.
-		Defaults to `"highp"` if supported by the device. See the note in "Things to Avoid"
-		[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices here].<br />
+		Defaults to `"highp"` if supported by the device.<br />
 
 		[page:Boolean alpha] - controls the default clear alpha value. When set to `true`, the value is `0`. Otherwise it's `1`. Default is `false`.<br />
 

+ 1 - 1
docs/api/zh/renderers/WebGLRenderer.html

@@ -28,7 +28,7 @@
 		[page:WebGLRenderingContext context] - 可用于将渲染器附加到已有的渲染环境([link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext RenderingContext])中。默认值是null<br />
 
 		[page:String precision] - 着色器精度. 可以是 *"highp"*, *"mediump"* 或者 *"lowp"*.
-		如果设备支持,默认为*"highp"* . 点击[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices here] 查看"应该避免的事"<br />
+		如果设备支持,默认为*"highp"* .<br />
 
 		[page:Boolean alpha] - controls the default clear alpha value. When set to *true*, the value is *0*. Otherwise it's *1*. Default is *false*.<br />