[rlgl] fix vertex calculation precision in vertex shader for depth buffer#5609
Closed
arlez80 wants to merge 1 commit intoraysan5:masterfrom
Closed
[rlgl] fix vertex calculation precision in vertex shader for depth buffer#5609arlez80 wants to merge 1 commit intoraysan5:masterfrom
arlez80 wants to merge 1 commit intoraysan5:masterfrom
Conversation
Contributor
|
Hi @arlez80 the default is already highp no? |
Contributor
Author
|
@maiconpintoabreu yes the glsl default is highp. |
Owner
|
@arlez80 Afair, not all platforms support |
Contributor
Author
|
@raysan5 like: // ...
#if defined(GRAPHICS_API_USE_HIGHP_VERTEX)
"in highp vec3 vertexPosition; \n"
#else
"in vec3 vertexPosition; \n"
#endif
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Insufficient precision in vertex calculations causes depth calculation issues when 3D rendering, resulting in Z-fighting or clipping error.
I fixed specify highp to ensure sufficient precision.
The screen flickers with every camera movement, I'm took two screenshots of the issues occurring.
environment: RG40XXH (Allwinner h700; Quad-core ARM Cortex-A53; G31 MP2 GPU)
the ground is clipped.
the character's some polygon is z-fighting. the ground depth is weird also.