Skip to content

Conversation

@greggman
Copy link
Contributor

just an idea, maybe @WestLangley has others?

@greggman
Copy link
Contributor Author

#14736

@mrdoob mrdoob requested a review from WestLangley August 20, 2018 21:40
@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.

3 participants