Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise

An asset by GEG-Fairbear8974
The page banner background of a mountain and forest
PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise thumbnail image
PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise thumbnail image
PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise hero image

Quick Information

0 ratings
PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise icon image
GEG-Fairbear8974
PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise

This is a Camera shader for Godot 4.3 to add distance fog with optional noise, color limiting, and dither. There are a lot of fragmented and partial solutions out there and I wanted to combine various techniques to make an easy to use quad-based shader. Each setting can be enabled/disabled and customized.** Updated for Godot 4.3. A 4.2 compatible version can be found within the repository's releases

Supported Engine Version
4.3
Version String
1.1
License Version
MIT
Support Level
community
Modified Date
9 months ago
Git URL
Issue URL

PSX-Style-Camera-Shader

This is a Camera shader for Godot 4 to add distance fog with optional noise, color limiting, and dither. There are a lot of fragmented and partial solutions out there and I wanted to combine various techniques to make an easy to use quad-based shader. Each setting can be enabled/disabled and customized. I have tested this in small maps (100x100) as well as large maps (6000x6000) with no issues.

For the fog, I took direct inspiration and direction from the excellent Godot4-ScreenSpacePostFX-DepthFog by zvodd. His technique is different (using viewports) and contains features mine does not, so please check it out! The color reduction and dithering techniques are my own.

Examples

All effects turned on (screen shot from my WIP game)

README All Effects - RotorSim

Fog

README Fog

Fog and Noise

README Fog, Noise

Fog, Noise, Color Limiting

README Fog, Noise, Color Limiting

Fog color can be changed

README Fog Pink

Instructions

If downloading the project, just open up the camera_example.tscn and check out how it works.

If starting from stratch, create a new 3D scene and add a camera. Create a new MeshInstance3D as a child of the camera, assign it a QuadMesh, then make the size 2x2. Check the box "flip faces". Move the mesh so it's in front of the camera very slightly. Then all you need to do is give the QuadMesh a new material -> New ShaderMaterial -> New Shader. Assign the psx_camera_shader.gdshader to the material and boom you're done. Check the shader parameters to make adjustments and edit everything:

Variables

Enable Fog - Enables/disables fog
Fog Color - Color of the fog
Noise Color - Color of the noise overlayed on top of the fog
Fog Distance - The distance in units away from the camera the fog is completely opaque
Noise Enabled - Turns noise on/off Fog Fade Range - How much distance the fog will take to fade to opaque
Noise Time Fac - The amount and movement of the noise
Enable Color Limitation - Enables/disables limiting the colors
Color Levels - Amount of colors allowed onscreen if Enable Color Limitation is checked
Enable Dithering - Enables/disables dithering
Dither Strength - Higher number mean bigger dots

Tips

If you have any transparent objects in your scene (meshes, sprites, etc) this shader won't "see" them as the render mode doesn't allow alpha transparency. In order to have transparent objects been seen you must change the "Render Priority" of each object to a number higher than "0". Everything in the editor is set to "0" for a new project, so in most cases setting this to "1" for Each transparent object will be adequete.

License

MIT. I hope this helps somebody in their Godot journey!

This is a Camera shader for Godot 4.3 to add distance fog with optional noise, color limiting, and dither. There are a lot of fragmented and partial solutions out there and I wanted to combine various techniques to make an easy to use quad-based shader. Each setting can be enabled/disabled and customized.

** Updated for Godot 4.3. A 4.2 compatible version can be found within the repository's releases

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise icon image
GEG-Fairbear8974
PSX Style Camera Shader - Distance Fog, Dithering, Color Limiter, Noise

This is a Camera shader for Godot 4.3 to add distance fog with optional noise, color limiting, and dither. There are a lot of fragmented and partial solutions out there and I wanted to combine various techniques to make an easy to use quad-based shader. Each setting can be enabled/disabled and customized.** Updated for Godot 4.3. A 4.2 compatible version can be found within the repository's releases

Supported Engine Version
4.3
Version String
1.1
License Version
MIT
Support Level
community
Modified Date
9 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers