LibGDX PSX-style render features

Related tags

Spring Boot gdx-psx
Overview

gdx-psx

gdx-psx its a library for LibGDX designed to assist you in simulation of PlayStation 1 graphics with few simple steps!

If you have questions or suggestions for this project, or you want to just chat about it - welcome to our discord.

Features:

  • Vertex Jitter(Inacuraccy)
  • Screen dithering
  • Color depth change
  • Texture shrink(compression)
  • Resolution downscaling

Install

  1. Add JitPack repository in your root build.gradle at the end of repositories:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add the psx-gdx dependency
dependencies {
    ...
    implementation 'com.github.fxgaming:gdx-psx:0.1.1a'
}

Quick start

gdx-psx have a lot of configurable parameters, recommended to check the demo before starting work with library!

Textures (Texture shrinking)

Library provides tool that helping you process textures and and downgrade their quality!
Fast texture processing:
TextureTransformer.shrinkTexture(Pixmap, ResizeType, textureSizeFactor, colorDepthFactor);
or with recommended parameters:
TextureTransformer.shrinkTexture(pixmap, ResizeType.EQUAL, 128f, 4f);
Instead of using Pixmap you can use FileHandle with your texture's path.

If you need to process bigger amount of textures with specified parameters:

TextureTransformer transformer = new TextureTransformer(); //using recommended parameters by default
transformer.setResizeType(ResizeType.ACCORDING_TO_HEIGHT);
transformer.setColorDepthFactor(8f);
//...
Texture newTexture = transformer.shrinkTexture(fileHandle);

3D effects (Vertex Jitter)

Library can provide Vertex Jitter effect to your models (via ModelBatch)

//You can provide your own shaders, but using libgdx's default shader by default.
ShaderTransformer transformer = new ShaderTransformer(); 
transformer.setResolution(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
transformer.setFactor(4f); //Jitter factor
//You can provide Config for ShaderProvider if needed
ModelBatch myModelBatch = new ModelBatch(transformer.createShaderProvider());

Library also supports gdx-gltf by mgsx To use ShaderTransformer with PBRShaderProvider use PBRShaderTransformer.

Post-processing (Downscaling, Color depth, Screen dithering)

Also library provides few things to work with post-processing!

  1. Create and customize post processing tool
PSXPostProcessing postProcessing = new PSXPostProcessing(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
postProcessing.setDownscalingIntensity(2f);
postProcessing.setColorDepth(64, 64, 64);
postProcessing.setDitheringMatrix(DitherMatrix.Dither4x4);
postProcessing.setFlagState(FlagType.DITHERING, true);
  1. Put this in the render loop
postProcessing.capture();
//rendering everything
postProcessing.endCapture();
postProcessing.drawImage();
You might also like...

SurvivalCore featuring SMP features like claims and land protection for Nukkit!

SurvivalCore SurvivalCore featuring Survival characterstics and claims and land protection for Nukkit! Features: Claims System : Use /claim or /c to c

Jan 4, 2022

Gitlet - A version control system for managing file versions, mirroring the features of Git

Gitlet - A version control system for managing file versions, mirroring the features of Git. Emphasized the serialization and manipulation of files to compress, access, and manage file content efficiently. Stressed the employment of appropriate data structures and file persistance.

Jan 4, 2022

A Java agent that disables platform features you don't use, before an attacker uses them against you.

aegis4j Avoid the NEXT Log4Shell vulnerability! The Java platform has accrued a number of features over the years. Some of these features are no longe

Jan 11, 2022

This app based on Java to make the life of firefighters easier by implementing features which they need in their day-to-day life

This app based on Java to make the life of firefighters easier by implementing features which they need in their day-to-day life

Fire Rescue App This app based on Java to make the life of firefighters easier by implementing features which they need in their day-to-day life. Scre

Jul 24, 2022

Features useful for Minecraft content developers.

Easy Development A mod to make Minecraft content development easier. Includes features primarily to assist with mod, resource pack, and datapack devel

Feb 15, 2022

RestApi para controle de extrato. (clientes - conta - features)

RestApi para controle de extrato. (clientes - conta - features)

⚙️ Acesso direto ao repositório: CODE FONTE Código Fonte : https://github.com/Camargovf/ApiBanco/tree/master Rest API realizada em Springboot 📄 Descr

Apr 30, 2022

EssentialClient is a client side mod originally forked from Carpet Client for 1.15.2 that implements new client side features

EssentialClient is a client side mod originally forked from Carpet Client for 1.15.2 that implements new client side features

EssentialClient EssentialClient is a client side only mod originally forked from Carpet Client for 1.15.2 that implements new client side features. Th

Jan 3, 2023

Custom Keycloak.X Server Distribution with selective features

Custom Keycloak Server Simple example for creating a custom Quarkus based Keycloak Distribution with 0 known CVEs. Features Create a custom Quarkus ba

Oct 19, 2022

An All-In-One Macro for Hypixel Skyblock. Includes numerous features for Quality of Life that do NOT abide by the Hypixel Rules.

AIOMacro An All-In-One Macro for Hypixel Skyblock. Includes numerous features for Quality of Life that do NOT abide by the Hypixel Rules. Installation

Dec 19, 2022
Comments
  • Added maven plugin for proper jitpack build pipeline

    Added maven plugin for proper jitpack build pipeline

    Hey!

    This PR cleans up your git repo a bit and also adds proper maven tasks so jitpack works properly.

    Mainly:

    • Added a gitignore file for all the useless files
    • Deleted everything committed which was in the .gitignore file (.gradle, eclipse project files, ...)
    • Deleted the bin folder, doesn't seem useful
    • Updated gradle version
    • And updated your gradle file a bit and added a publishing gradle file which defines a couple meta data for the repo
    opened by lyze237 1
Releases(0.1.5)
  • 0.1.5(Dec 31, 2022)

    This is pretty fundamental update for the library, and this library becomes something slightly bigger than just effects library. Main features added in this update:

    • ShaderTransformers are replaced with PSXShader
    • PSXShader added as replacement for the default 3d rendering pipeline
    • Added Texture Affineness effect
    • Added support for LUT maps (diffuse, emissive, specular)
    • Added support for SpotLights
    • Added 2 types of PSXShader (per-vertex lit & per-pixel lit)

    Starting from this update library will contain some other post-processing effects, such as LUT maps (that are not affilated with PS1 effects) Also library migrated from insane method of shader transforming primarily to changing shader in ModelBatch. Android support is questionable, gdx-gltf support isn't available anymore.

    Feel free to write issues is something wrong happened, happy new year!

    Source code(tar.gz)
    Source code(zip)
    base-lut-texture.png(2.04 KB)
    gdx-psx-0.1.5.jar(58.47 KB)
  • 0.1.4(Sep 29, 2022)

    After Yahel message about problems with android support shaders was slightly changed and also added error message in case if shader won't compile. If someone having troubles - feel free to write your problems in Issues or join discord to report your problem immidiately

    Source code(tar.gz)
    Source code(zip)
  • 0.1.3(May 3, 2022)

    This update finally replacing crappy-looking dithering by the awesome scalable texture dithering Dithering come with 4 default matrices: Bayer 8x8; 4x4; 3x3; 2x2. Also now you're able to create your own dithering matrix and easily set it to the PSXPostProcessing via setDitheringMatrix method

    And thanks for the @lyze237 for clearing all garbage from the repo and maven support, i'm very appreciating that!!!

    Changes:

    • Removed old number-pattern dithering
    • Added texture-dithering
    • Added filter configuration to TextureTransformer
    • Minor changes in ShaderTransformer
    Source code(tar.gz)
    Source code(zip)
    gdx-psx-0.1.3.jar(80.45 KB)
  • 0.1.1a(Jan 7, 2022)

    • Refactored and updated PSXPostProcessing (prev. FBODownscaling)
    • ShaderTransformer new TransformType added
    • TextureTransformer Color Depth Change alpha-channel fix(alpha was const 1)
    • Post processing vertex shader moved to separate file
    • Added pattern-glsl-code (psx.3d.vert) as separate file.
    • Readme.md update
    Source code(tar.gz)
    Source code(zip)
    gdx-psx-0.1.1a.jar(29.82 KB)
  • 0.1.0a(Jan 5, 2022)

Owner
Matvey
50% Java, 10% Lua, 15% C#, 0.1% Human, 99.9% Fairness
Matvey
There is no good reason to render the hotbar at 100+ fps

FasterGUI Render the HUD and screens at a lower framerate to speed up what's really important: the worldrendering. Renders the HUD at a lower fixed fr

tr7zw 124 Dec 22, 2022
First experiments to try to render the Doom WAD maps using only standard libraries. Test 004 - https://youtu.be/-6mePgg7gXE

JavaDoomWADMapRendererTests Test 001 (07/set/2022) - https://youtu.be/MpY0PICdcwM First experiments to try to render the Doom WAD maps using only stan

Leo 6 Oct 17, 2022
A networking library for LibGDX utilizing Netty allowing easy creation of multiplayer games.

Lunar What is Lunar? Lunar is a networking library for LibGDX. With lunar you can easily create multiplayer games quickly and efficiently. Lunar provi

Vrekt 28 Nov 25, 2022
An open source civilization like game made in LibGDX

OpenCiv A turn based strategy game built on LibGDX, with a rouge-like tile set. About OpenCiv is a love letter to turn based strategy games inspired b

Rhin 58 Dec 26, 2022
Kotlin/LibGDX port of my Unity 2D Sandbox

TileRPG Kotlin port/continuation of my Unity TileRPG game, which was in itself a rewrite of my first attempt at making a 2D sandbox game. A libGDX pro

null 1 Jan 23, 2022
Simple micro web framework written in Pragmatic Functional Java style

Pragmatica REST Example Example nano web framework written in Pragmatic Functional Java style. Example public class App { public static void main(

Sergiy Yevtushenko 8 Oct 21, 2022
LaetLang is an interpreted C style language. It has file reading/writting, TCP network calls and awaitable promises.

LaetLang ?? LaetLang is an interpreted C style language built by following along Robert Nystrom's book Crafting Interpreters. This is a toy language t

Alexander Shevchenko 6 Mar 14, 2022
A hybrid chat android application based on the features of Instagram and Whatsapp having UI just as Telegram.

GupShup About App It is a free online chat android application, enabling user to create a free user account and then log in using the credentials. Aft

Ratik Tiwari 1 May 22, 2022
A simple quarkus app with hibernate as ORM, used to show the features of Hibernate Search

beer-manager-hibernate-search Project This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, ple

Sedona Solutions 3 Jan 6, 2022
This app brings Privacy dashboard features from Android 12 to older android devices.

PrivacyDashboard This app brings Privacy dashboard features from Android 12 to older android devices. Have you ever thought which apps are accessing y

Rushikesh Kamewar 234 Jan 7, 2023