{"id":13529192,"url":"https://github.com/crashinvaders/gdx-vfx","last_synced_at":"2025-04-06T20:12:59.566Z","repository":{"id":43318878,"uuid":"168205009","full_name":"crashinvaders/gdx-vfx","owner":"crashinvaders","description":"libGDX post-processing visual effects","archived":false,"fork":false,"pushed_at":"2024-01-15T20:47:25.000Z","size":13969,"stargazers_count":195,"open_issues_count":6,"forks_count":26,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-30T18:11:09.266Z","etag":null,"topics":["game-development","glsl","libgdx","opengl","opengl-es","posteffect","shaders"],"latest_commit_sha":null,"homepage":"https://crashinvaders.github.io/gdx-vfx","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crashinvaders.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-01-29T18:21:18.000Z","updated_at":"2025-03-07T04:45:05.000Z","dependencies_parsed_at":"2023-01-30T17:16:04.296Z","dependency_job_id":"fedcd8f2-afe8-4a80-942a-f44f2f2dfcfd","html_url":"https://github.com/crashinvaders/gdx-vfx","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashinvaders%2Fgdx-vfx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashinvaders%2Fgdx-vfx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashinvaders%2Fgdx-vfx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashinvaders%2Fgdx-vfx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crashinvaders","download_url":"https://codeload.github.com/crashinvaders/gdx-vfx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543593,"owners_count":20955865,"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","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":["game-development","glsl","libgdx","opengl","opengl-es","posteffect","shaders"],"created_at":"2024-08-01T07:00:34.216Z","updated_at":"2025-04-06T20:12:59.539Z","avatar_url":"https://github.com/crashinvaders.png","language":"Java","funding_links":[],"categories":["Resources"],"sub_categories":["Visual Effects"],"readme":"![Logo](https://i.imgur.com/kVBGQHx.png)\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.crashinvaders.vfx/gdx-vfx-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.crashinvaders.vfx%22%20AND%20a:%22gdx-vfx-core%22)\n[![libGDX](https://img.shields.io/badge/libgdx-1.12.0-red.svg)](https://libgdx.com/)\n\nFlexible post-processing shader visual effects for LibGDX. The library is based on [libgdx-contribs-postprocessing](https://github.com/manuelbua/libgdx-contribs/tree/master/postprocessing), with lots of improvements and heavy refactoring.\nThe goal is to focus on stability, offer lightweight integration and provide simple effect implementation mechanism.\n\nThe library is in Beta, the code is poorly documented. Some goodies might be missing and more cool stuff is to be implemented soon.\n\nRead more about the library at the [wiki introduction page](https://github.com/crashinvaders/gdx-vfx/wiki/Library-overview).\n\nAll the major changes are listed in the [CHANGES.md](https://github.com/crashinvaders/gdx-vfx/blob/master/CHANGES.md) file.\n\n# Known problems in 0.5.1\n- iOS integration requires an extra step in order to make the `gdx-vfx-effects` asset files available on runtime. Please read [this thread](https://github.com/crashinvaders/gdx-vfx/issues/16#issuecomment-1003156513) for temporary workaround.\n\n# Demo\n\nVisit https://crashinvaders.github.io/gdx-vfx\n\nOr clone and play with the demo locally:\n```\ngit clone https://github.com/crashinvaders/gdx-vfx.git\ncd gdx-vfx\n./gradlew demo:desktop:run\n```\n\n![Alt Text](https://imgur.com/dCsVhoo.gif)\n\n# How to use\n\n### 1. Add the library to the project\n\n#### Maven dependency\nThe library's stable releases are available through maven central repo.\n\nAdd it in your root `build.gradle` at the end of repositories:\n```gradle\nallprojects {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n\nAdd the dependency:\n```gradle\ndependencies {\n    implementation 'com.crashinvaders.vfx:gdx-vfx-core:0.5.4'\n    implementation 'com.crashinvaders.vfx:gdx-vfx-effects:0.5.4'    // Optional, if you need standard filter/effects.\n}\n```\n\n#### HTML/GWT support\nThe library is fully HTML/GWT compatible, but requires an extra dependency to be included to GWT module in order to work properly.  \nPlease consider reading [GWT integration guide](https://github.com/crashinvaders/gdx-vfx/wiki/GWT-HTML-Library-Integration).\n```gradle\ndependencies {\n    implementation 'com.crashinvaders.vfx:gdx-vfx-gwt:0.5.4'\n}\n```\n\n#### Other integration options\nThere are number of ways to incorporate the library into the project. \nIf you're looking for snapshot version artifacts or another approach, please read the [general integration guide](https://github.com/crashinvaders/gdx-vfx/wiki/General-Library-Integration).\n\n### 2. Sample code\n\nA simple example of a LibGDX application that applies gaussian blur effect to a geometry drawn with `ShapeRenderer`.\n\n```java\nimport com.badlogic.gdx.ApplicationAdapter;\nimport com.badlogic.gdx.Gdx;\nimport com.badlogic.gdx.graphics.Color;\nimport com.badlogic.gdx.graphics.GL20;\nimport com.badlogic.gdx.graphics.Pixmap;\nimport com.badlogic.gdx.graphics.glutils.ShapeRenderer;\nimport com.crashinvaders.vfx.VfxManager;\nimport com.crashinvaders.vfx.effects.GaussianBlurEffect;\n\npublic class VfxExample extends ApplicationAdapter {\n    private ShapeRenderer shapeRenderer;\n    private VfxManager vfxManager;\n    private GaussianBlurEffect vfxEffect;\n\n    @Override\n    public void create() {\n        shapeRenderer = new ShapeRenderer();\n\n        // VfxManager is a host for the effects.\n        // It captures rendering into internal off-screen buffer and applies a chain of defined effects.\n        // Off-screen buffers may have any pixel format, for this example we will use RGBA8888.\n        vfxManager = new VfxManager(Pixmap.Format.RGBA8888);\n\n        // Create and add an effect.\n        // VfxEffect derivative classes serve as controllers for the effects.\n        // They provide public properties to configure and control them.\n        vfxEffect = new GaussianBlurEffect();\n        vfxManager.addEffect(vfxEffect);\n    }\n\n    @Override\n    public void resize(int width, int height) {\n        // VfxManager manages internal off-screen buffers,\n        // which should always match the required viewport (whole screen in our case).\n        vfxManager.resize(width, height);\n\n        shapeRenderer.getProjectionMatrix().setToOrtho2D(0f, 0f, width, height);\n        shapeRenderer.updateMatrices();\n    }\n\n    @Override\n    public void render() {\n        // Clean up the screen.\n        Gdx.gl.glClearColor(0f, 0f, 0f, 1f);\n        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n        // Clean up internal buffers, as we don't need any information from the last render.\n        vfxManager.cleanUpBuffers();\n\n        // Begin render to an off-screen buffer.\n        vfxManager.beginInputCapture();\n\n        // Here's where game render should happen.\n        // For demonstration purposes we just render some simple geometry.\n        shapeRenderer.begin(ShapeRenderer.ShapeType.Filled);\n        shapeRenderer.setColor(Color.PINK);\n        shapeRenderer.rect(250f, 100f, 250f, 175f);\n        shapeRenderer.setColor(Color.ORANGE);\n        shapeRenderer.circle(200f, 250f, 100f);\n        shapeRenderer.end();\n\n        // End render to an off-screen buffer.\n        vfxManager.endInputCapture();\n\n        // Apply the effects chain to the captured frame.\n        // In our case, only one effect (gaussian blur) will be applied.\n        vfxManager.applyEffects();\n\n        // Render result to the screen.\n        vfxManager.renderToScreen();\n    }\n\n    @Override\n    public void dispose() {\n        // Since VfxManager has internal frame buffers,\n        // it implements Disposable interface and thus should be utilized properly.\n        vfxManager.dispose();\n\n        // *** PLEASE NOTE ***\n        // VfxManager doesn't dispose attached VfxEffects.\n        // This is your responsibility to manage their lifecycle.\n        vfxEffect.dispose();\n\n        shapeRenderer.dispose();\n    }\n}\n``` \n\n![Result](https://i.imgur.com/XjBynGw.png)\n\n_The actual example code can be found [here](https://github.com/crashinvaders/gdx-vfx/blob/master/demo/core/src/com/crashinvaders/vfx/demo/screens/example/VfxExample.java)._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrashinvaders%2Fgdx-vfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrashinvaders%2Fgdx-vfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrashinvaders%2Fgdx-vfx/lists"}