Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGLRenderer.precision: Update docs #24161

Merged
merged 3 commits into from
May 31, 2022
Merged

WebGLRenderer.precision: Update docs #24161

merged 3 commits into from
May 31, 2022

Conversation

Strepto
Copy link
Contributor

@Strepto Strepto commented May 30, 2022

Related issue: #24160

Description

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.

Feel free to close this PR if you feel its too narrow, or if you feel the comment should be removed in its entirety. 馃憤

Thanks for the great library and tool :)

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.
@LeviPesin
Copy link
Contributor

@Mugen87
Copy link
Collaborator

Mugen87 commented May 30, 2022

or if you feel the comment should be removed in its entirety

I vote for that option.

@Strepto
Copy link
Contributor Author

Strepto commented May 30, 2022

I removed the note 馃憤

@mrdoob mrdoob added this to the r142 milestone May 31, 2022
@mrdoob mrdoob merged commit b1207a1 into mrdoob:dev May 31, 2022
@mrdoob
Copy link
Owner

mrdoob commented May 31, 2022

Thanks!

@Strepto Strepto deleted the patch-1 branch May 31, 2022 06:30
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* 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 <michael.herzog@human-interactive.org>
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
* 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 <michael.herzog@human-interactive.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants