kivy.graphics.transformation.Matrix.view_clip() produces incorrect matrix #5881
Labels
Component: core-providers
kivy/core
Component: graphics
kivy/graphics
Status: Needs-analysis
Issue needs to be analyzed if it's real
Projects
The code producing the view_clip matrix has an incorrect value for matrix element 10. The kivy code sets element 10 to
2/(far-near)
, but numerous sources indicate that the correct value is-2/(far-near)
:Versions
Description
While trying to use an orthographic projection in the kivy example
3Drendering
, I was unable to get satisfactory results. After lengthy investigation, I realized that the matrix produced byMatrix().view_clip()
is incorrect when theperspective
argument is0
.Code and Logs
Simply changing the
perspective
argument in the line:from
1
to0
inupdate_glsl()
inmain.py
, results in a black screen (no obj displayed). Correcting the element in question with the lines below:produces the correct result.
The text was updated successfully, but these errors were encountered: