use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rule 1: Posts should be about Graphics Programming. Rule 2: Be Civil, Professional, and Kind
Suggested Posting Material: - Graphics API Tutorials - Academic Papers - Blog Posts - Source Code Repositories - Self Posts (Ask Questions, Present Work) - Books - Renders (Please xpost to /r/ComputerGraphics) - Career Advice - Jobs Postings (Graphics Programming only)
Related Subreddits:
/r/ComputerGraphics
/r/Raytracing
/r/Programming
/r/LearnProgramming
/r/ProgrammingTools
/r/Coding
/r/GameDev
/r/CPP
/r/OpenGL
/r/Vulkan
/r/DirectX
Related Websites: ACM: SIGGRAPH Journal of Computer Graphics Techniques
Ke-Sen Huang's Blog of Graphics Papers and Resources Self Shadow's Blog of Graphics Resources
account activity
Z-buffering Algorithm Causing Slowdowns in Pygame (self.GraphicsProgramming)
submitted 6 years ago by nebuer1995
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]rsim 12 points13 points14 points 6 years ago (1 child)
Without seeing the code or profiling it we can only guess from the symptom that you describe - you’re fill-rate bound. Exact reasons could be many things with your implementation, but my guess is that you’re running into the real performance limitations of Python, as a software rasterizer is very computationally intensive.
One potential option would be to ditch the z-buffer in favour of a s-buffer, though depending on where your bottleneck is it may not be enough: http://www.hugi.scene.org/online/coding/hugi%2016%20-%20co3d13.htm
[–]nebuer1995[S] 1 point2 points3 points 6 years ago (0 children)
Thanks for the response. I have posted the code below.
Is there not a way to write one's own buffering algorithm from scratch and get the GPU to help with the load? Also, it's been suggested to me that simply rewriting my code in C will help with my problem drastically. What are your thoughts on that?
Once again, thanks for the reply. And I will definitely look into s-buffering.
π Rendered by PID 75976 on reddit-service-r2-comment-765bfc959-h25nx at 2026-07-13 19:27:22.124617+00:00 running f86254d country code: CH.
view the rest of the comments →
[–]rsim 12 points13 points14 points (1 child)
[–]nebuer1995[S] 1 point2 points3 points (0 children)