{"id":355518,"date":"2026-07-08T21:29:17","date_gmt":"2026-07-08T21:29:17","guid":{"rendered":"https:\/\/peraltafinancing.com\/animation\/opengl-python-program-for-rendering-poke-ball\/"},"modified":"2026-07-08T21:29:17","modified_gmt":"2026-07-08T21:29:17","slug":"opengl-python-program-for-rendering-poke-ball","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=355518","title":{"rendered":"OpenGL Python Program for Rendering Pok\u00e9 Ball"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"post-body-4160398649736193444\" itemprop=\"description articleBody\">\n<p>\u00a0<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"https:\/\/preview.redd.it\/opengl-pok%C3%A9-ball-renderer-pixel-style-v0-f3l7lg3ms8lg1.png?width=1080&amp;crop=smart&amp;auto=webp&amp;s=d42963ae217d7dd80750bfd4ea4a6c76ce683960\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"761\" data-original-width=\"1080\" height=\"282\" loading=\"lazy\" src=\"https:\/\/preview.redd.it\/opengl-pok%C3%A9-ball-renderer-pixel-style-v0-f3l7lg3ms8lg1.png?width=1080&amp;crop=smart&amp;auto=webp&amp;s=d42963ae217d7dd80750bfd4ea4a6c76ce683960\" width=\"400\"\/><\/a><\/div>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">1. Render a Normal 3D Pok\u00e9 Ball<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">The Pok\u00e9<br \/>\nBall itself is usually just a sphere mesh with:<\/span><\/p>\n<ul type=\"disc\">\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l4 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A red upper hemisphere <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l4 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A white lower hemisphere <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l4 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A black center band <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l4 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A circular button on the<br \/>\n     front <\/span><\/li>\n<\/ul>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">The<br \/>\ngeometry can be:<\/span><\/p>\n<ul type=\"disc\">\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l6 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A UV sphere <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l6 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">An icosphere <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l6 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A procedurally generated<br \/>\n     sphere <\/span><\/li>\n<\/ul>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">The<br \/>\nfragment shader might assign colors based on position:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">if (worldPos.y &gt; 0.0)<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>color = vec3(1.0, 0.0, 0.0); \/\/ red<br \/>else<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>color = vec3(1.0);<span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\/\/ white<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">The black<br \/>\nband can be created using latitude calculations or a separate mesh.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">2. Use Low-Resolution Rendering<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A common<br \/>\npixel-art trick is rendering to a small framebuffer first.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">For<br \/>\nexample:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">320 x 180<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">instead<br \/>\nof:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">1920 x 1080<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">The scene<br \/>\nis rendered into an off-screen texture (FBO).<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Then that<br \/>\ntexture is stretched to the screen using:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">GL_NEAREST<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">filtering.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">This<br \/>\ncreates large visible pixels.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">glTexParameteri(<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>GL_TEXTURE_2D,<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>GL_TEXTURE_MIN_FILTER,<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>GL_NEAREST<br \/>);<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">3. Quantized Lighting<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Instead<br \/>\nof smooth lighting:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">float diffuse = max(dot(N, L), 0.0);<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">you<br \/>\nreduce it to a few discrete levels.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Example:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">float diffuse = max(dot(N, L), 0.0);<\/span><\/p>\n<p>diffuse = floor(diffuse * 4.0) \/ 4.0;<\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">This produces<br \/>\nonly 4 brightness levels.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Result:<\/span><\/p>\n<ul type=\"disc\">\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l3 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Bright region <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l3 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Mid-bright <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l3 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Mid-dark <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l3 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Dark <\/span><\/li>\n<\/ul>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Very<br \/>\nsimilar to retro sprite shading.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">4. Palette Reduction<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Pixel-art<br \/>\nrenderers often limit colors intentionally.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Example:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">vec3 color = baseColor * diffuse;<\/span><\/p>\n<p>color = floor(color * 8.0) \/ 8.0;<\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">This<br \/>\nconverts continuous colors into a small palette.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Instead<br \/>\nof thousands of shades, you might have:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">giving a<br \/>\nclassic pixel-art appearance.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">5. Pixel Grid Snapping<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Many<br \/>\nprojects quantize screen coordinates.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Example:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">vec2 pixelSize = vec2(4.0);<\/span><\/p>\n<p>vec2 snappedUV =<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>floor(gl_FragCoord.xy \/ pixelSize)<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>* pixelSize;<\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">All<br \/>\nfragments within a block sample the same value.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">This<br \/>\ncreates chunky pixels even when rendering at higher resolutions.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">6. Dithering<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">To fake<br \/>\nadditional colors, retro-style renderers often use dithering.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Common<br \/>\npatterns:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 13.5pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Bayer Matrix<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">0<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>8<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>2 10<br \/>12 4 14 6<br \/>3 11 1<span style=\"mso-spacerun: yes;\">\u00a0 <\/span>9<br \/>15 7 13 5<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Shader:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">if(diffuse<br \/>\n<span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>color *= 0.8;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">This<br \/>\ncreates the checkerboard patterns often seen in pixel art.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">7. Outline Rendering<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Many<br \/>\nstylized renders add outlines.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Two<br \/>\ncommon methods:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 13.5pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Inverted Hull<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Render<br \/>\nthe model twice:<\/span><\/p>\n<ol start=\"1\" type=\"1\">\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l2 level1 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Normal render <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l2 level1 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Render enlarged backfaces in<br \/>\n     black <\/span><\/li>\n<\/ol>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">position += normal * 0.02;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Produces<br \/>\na cartoon outline.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 13.5pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Edge Detection<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Run a<br \/>\npost-process pass using:<\/span><\/p>\n<ul type=\"disc\">\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l1 level1 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Depth buffer <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l1 level1 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Normal buffer <\/span><\/li>\n<\/ul>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Detect<br \/>\nsharp changes and draw black edges.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">8. Shadow Quantization<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">If the<br \/>\nimage has sharp, stylized shadows, they may use toon shading:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">if(diffuse &gt; 0.7)<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>shade = 1.0;<br \/>else if(diffuse &gt; 0.4)<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>shade = 0.7;<br \/>else<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>shade = 0.3;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Instead<br \/>\nof smooth gradients, you get discrete shadow bands.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">9. Specular Highlights<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">The shiny<br \/>\nwhite highlight on the Pok\u00e9 Ball can be stylized:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">float spec =<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0 <\/span>pow(max(dot(R, V), 0.0), 32.0);<\/span><\/p>\n<p>spec = step(0.5, spec);<\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Using <\/span><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">step()<\/span><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\"> creates a hard-edged highlight instead of a<br \/>\nrealistic glossy reflection.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;\"><b><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 18.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">10. Typical Rendering Pipeline<\/span><\/b><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">A common<br \/>\npipeline would be:<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\"><span style=\"font-family: &quot;Courier New&quot;; font-size: 10.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Sphere Mesh<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\u2193<br \/>Vertex Shader<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\u2193<br \/>Toon Lighting<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\u2193<br \/>Palette Reduction<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\u2193<br \/>Render to Low-Res FBO<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\u2193<br \/>Nearest Neighbor Upscaling<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\u2193<br \/>Dithering Pass<br \/><span style=\"mso-spacerun: yes;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\u2193<br \/>Display<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">The<br \/>\ncharacteristic &#8220;3D object that looks like pixel art&#8221; usually comes<br \/>\nprimarily from:<\/span><\/p>\n<ol start=\"1\" type=\"1\">\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l0 level1 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Rendering to a very<br \/>\n     low-resolution framebuffer <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l0 level1 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Nearest-neighbor upscaling <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l0 level1 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Quantized (toon) lighting <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l0 level1 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Palette reduction <\/span><\/li>\n<li class=\"MsoNormal\" style=\"line-height: normal; mso-list: l0 level1 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Optional dithering and<br \/>\n     outlines <\/span><\/li>\n<\/ol>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">Those<br \/>\nfive techniques together can make a smooth 3D OpenGL model look remarkably<br \/>\nsimilar to hand-drawn pixel art while still being fully real-time and<br \/>\nrotatable.<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;\"><span style=\"font-family: &quot;Times New Roman&quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-fareast-language: EN-IN;\">It can be generate via below mentioned stacks &#8211;\u00a0<\/span><\/p>\n<li data-end=\"314\" data-section-id=\"1gng5k9\" data-start=\"255\"><strong data-end=\"277\" data-start=\"258\">PyOpenGL + GLFW<\/strong> (closest to modern OpenGL tutorials)\n<\/li>\n<li data-end=\"339\" data-section-id=\"1hveuub\" data-start=\"315\">\n<strong data-end=\"339\" data-start=\"318\">PyOpenGL + Pygame<\/strong>\n<\/li>\n<li data-end=\"390\" data-section-id=\"83thy8\" data-start=\"340\">\n<strong data-end=\"355\" data-start=\"343\">moderngl<\/strong> (cleaner Python API, often easier)\n<\/li>\n<li data-end=\"404\" data-section-id=\"1l21td8\" data-start=\"391\">\n<strong data-end=\"404\" data-start=\"394\">Pyglet<\/strong>\n<\/li>\n<li data-end=\"440\" data-section-id=\"sqqcld\" data-start=\"405\">\n<strong data-end=\"418\" data-start=\"408\">Ursina<\/strong> (higher-level engine)<\/li>\n<div class=\"download-card\">\n<div class=\"file-info\">\n<h3>Python Project<\/h3>\n<p>Google Doc File \u2022 7 KB<\/p>\n<\/p><\/div>\n<p>  <a class=\"download-action\" href=\"https:\/\/docs.google.com\/document\/d\/1SDgkkOGE0i66-THoxS1G7-6pHYQwdstLewzz_czHjzM\/edit?usp=sharing\"><br \/>\n    Download<br \/>\n  <\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 1. Render a Normal 3D Pok\u00e9 Ball The Pok\u00e9 Ball itself is usually just a sphere mesh with: A red upper hemisphere A white lower hemisphere A black center band A circular button on the front The geometry can be: A UV sphere An icosphere A procedurally generated sphere The fragment shader might assign [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":355520,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12035],"tags":[724,17996,59532,13239,21302,15748],"dealstore":[],"offerexpiration":[],"class_list":["post-355518","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-animation","tag-ball","tag-opengl","tag-poke","tag-program","tag-python","tag-rendering"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>OpenGL Python Program for Rendering Pok\u00e9 Ball - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=355518\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OpenGL Python Program for Rendering Pok\u00e9 Ball - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"\u00a0 1. Render a Normal 3D Pok\u00e9 Ball The Pok\u00e9 Ball itself is usually just a sphere mesh with: A red upper hemisphere A white lower hemisphere A black center band A circular button on the front The geometry can be: A UV sphere An icosphere A procedurally generated sphere The fragment shader might assign [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=355518\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-08T21:29:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=355518#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=355518\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"OpenGL Python Program for Rendering Pok\u00e9 Ball\",\"datePublished\":\"2026-07-08T21:29:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=355518\"},\"wordCount\":528,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=355518#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png\",\"keywords\":[\"Ball\",\"OpenGL\",\"Poke\",\"Program\",\"Python\",\"rendering\"],\"articleSection\":[\"Animation\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=355518#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=355518\",\"url\":\"https:\/\/fivemor.com\/?p=355518\",\"name\":\"OpenGL Python Program for Rendering Pok\u00e9 Ball - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=355518#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=355518#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png\",\"datePublished\":\"2026-07-08T21:29:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=355518#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=355518\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=355518#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png\",\"width\":1080,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=355518#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenGL Python Program for Rendering Pok\u00e9 Ball\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OpenGL Python Program for Rendering Pok\u00e9 Ball - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=355518","og_locale":"en_US","og_type":"article","og_title":"OpenGL Python Program for Rendering Pok\u00e9 Ball - Som2ny Network","og_description":"\u00a0 1. Render a Normal 3D Pok\u00e9 Ball The Pok\u00e9 Ball itself is usually just a sphere mesh with: A red upper hemisphere A white lower hemisphere A black center band A circular button on the front The geometry can be: A UV sphere An icosphere A procedurally generated sphere The fragment shader might assign [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=355518","og_site_name":"Som2ny Network","article_published_time":"2026-07-08T21:29:17+00:00","og_image":[{"width":1080,"height":630,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=355518#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=355518"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"OpenGL Python Program for Rendering Pok\u00e9 Ball","datePublished":"2026-07-08T21:29:17+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=355518"},"wordCount":528,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=355518#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png","keywords":["Ball","OpenGL","Poke","Program","Python","rendering"],"articleSection":["Animation"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=355518#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=355518","url":"https:\/\/fivemor.com\/?p=355518","name":"OpenGL Python Program for Rendering Pok\u00e9 Ball - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=355518#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=355518#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png","datePublished":"2026-07-08T21:29:17+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=355518#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=355518"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=355518#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/AEn0k_tn_t_sAvXaQhm0pEjWraK_L0kIT70iiEFh7UUaEqyMZmRO2mE1iwEnJCbacuMarsuuKgOrpt5vSv_fgEf8j4Ya6H9FwY2M.png","width":1080,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=355518#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"OpenGL Python Program for Rendering Pok\u00e9 Ball"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/355518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=355518"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/355518\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/355520"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=355518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=355518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=355518"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=355518"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=355518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}