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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use depth fog if not highp #14740

Closed
wants to merge 1 commit into from
Closed

use depth fog if not highp #14740

wants to merge 1 commit into from

Conversation

greggman
Copy link
Contributor

just an idea, maybe @WestLangley has others?

@greggman
Copy link
Contributor Author

#14736

@mrdoob mrdoob added this to the r96 milestone Aug 20, 2018
@greggman
Copy link
Contributor Author

mediump can't handle anything with large positions. All the specular lighting breaks in mediump too. See #14570 (comment)

@WestLangley
Copy link
Collaborator

mediump can't handle anything with large positions.

In the fiddle in #14736, the depth is 500. That is not big. Perhaps the problem is in squaring that to compute the length.

How about

float fogDepth = - vFogPosition.z * length( vFogPosition / vFogPosition.z );

Actually, you would have normalize by the max component. Consider this a proof-of-concept.

@mrdoob
Copy link
Owner

mrdoob commented Aug 21, 2018

Closing in favour of #14752

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

3 participants