{"id":30774194,"url":"https://github.com/g3th/libgdx-mesh-creation","last_synced_at":"2026-04-12T22:38:37.679Z","repository":{"id":304030425,"uuid":"1017534711","full_name":"g3th/Libgdx-Mesh-Creation","owner":"g3th","description":"Create a Mesh and Quad in Libgdx, for custom shader post-processing.","archived":false,"fork":false,"pushed_at":"2025-07-10T19:12:35.000Z","size":222,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T00:42:06.423Z","etag":null,"topics":["android","android-studio","blending","domain-distortion","kotlin","libgdx","opengl-es","shaders"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g3th.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-10T17:22:43.000Z","updated_at":"2025-07-10T19:12:38.000Z","dependencies_parsed_at":"2025-07-11T00:42:17.616Z","dependency_job_id":"3cfdad75-b7dd-46ad-a71e-d80f5a51ee9d","html_url":"https://github.com/g3th/Libgdx-Mesh-Creation","commit_stats":null,"previous_names":["g3th/libgdx-mesh-creation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/g3th/Libgdx-Mesh-Creation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FLibgdx-Mesh-Creation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FLibgdx-Mesh-Creation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FLibgdx-Mesh-Creation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FLibgdx-Mesh-Creation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g3th","download_url":"https://codeload.github.com/g3th/Libgdx-Mesh-Creation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FLibgdx-Mesh-Creation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273703695,"owners_count":25153001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-studio","blending","domain-distortion","kotlin","libgdx","opengl-es","shaders"],"created_at":"2025-09-05T02:50:46.915Z","updated_at":"2026-04-12T22:38:32.642Z","avatar_url":"https://github.com/g3th.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibGDX - Mesh Creation\n## Create a Mesh, Render a Quad and Post-Process the Scene\n\nhttps://github.com/user-attachments/assets/298a2852-f752-4f44-bd7c-7b6433611607\n\nLibGDX provides a convenient way to render your scene in its `SpriteBatch` implementation. This will usually suffice for most games rendering simple scenes comprised of sprites, textures and the API's default shader. Rendering this way will also usually be enough if simple post-processing needs to be applied to single sprites or single textures.\n \nHowever (here is the conjuctive adverb connecting two independent clauses), when more complex post-processing is required, or a more involved scene is being rendered, different textures might need to be post-processed by the same fragment shader, blended and rendered simultaneously.\n \nIn this instance, the default `SpriteBatch` implementation is a very poor choice; once these separate textures are bound to various slots (Texture Units in OpenGL, where at least a minimum of 16 units are available) as the scene is being rendered, only slot 0 will be available due to how the library implements its rendering method. Therefore, when these textures are passed as sampler uniforms in the fragment shader (i.e. `uniform sampler2D u_texture0, u_texture1, etc...`) only one texture will ever be accessible.\n\nCreating a mesh here is the best choice, as it will allow you to bind textures properly, post-process and render the scene as required. There are some complexities involved, such as choosing the correct `sfactor` and `dfactor` parameters when blending with `glBlendFunc`, or knowing how to draw the quad with two triangles, but once these are learned there isn't much to it.\n\nThis Android app demonstrates how to:\n* Create a Mesh and Quad in LibGDX\n* Use Frame Buffers for \"first pass\" rendering, and obtain the required texture for post-processing (in the case of a TextureAtlas being present)\n* Apply some simple domain distortion and blending to each texture in the fragment shader\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg3th%2Flibgdx-mesh-creation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg3th%2Flibgdx-mesh-creation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg3th%2Flibgdx-mesh-creation/lists"}