A PSX style shader created for a libGDX horror game
Create a folder called shaders in your libGDX assets folder. Copy the glsl files in the repo to this folder
Copy the PsxShader.kt file into your project add the correct package to the top of the file
Place the following as a variable where you are creating your ModelBatch
val psxShaderProvider = object : ShaderProvider {
val shader = PsxShader()
override fun dispose() {
shader.dispose()
}
override fun getShader(renderable: Renderable): Shader {
shader.init()
return shader
}
}
Pass the shader into the ModelBatch during its creation
modelBatch = ModelBatch(psxShaderProvider)
You will now have a PSX shader working on your libGDX 3D game!!