Update on PSX Shader Fog
CopperCube PSX Shader » Devlog
Overview
In this update, made significant improvements to our PlayStation (PSX) shader. The primary enhancement is the addition of a fog effect, which helps replicate the classic look and feel of PSX-era games. This update affects both the OpenGL and DirectX versions of our shader.
Changes and Enhancements
1. Addition of Fog Effect
- Fog Density Parameter
- New Property:
FogDensity
- Description: Controls the density of the fog effect applied to the scene.
- New Property:
- Implementation in OpenGL Shader
- Vertex Shader:
- Added a new varying variable
depth
to store the depth value. - Modified the w-component of the
gl_Position
to calculate the fog density. - Passed the depth value to the fragment shader.
- Added a new varying variable
- Fragment Shader:
- Used the depth value to calculate the fog effect.
- Applied the fog effect by dividing the color by the depth value.
- Ensured the fog effect does not exceed the original color values.
- Vertex Shader:
- Implementation in DirectX Shader
- Vertex Shader:
- Added a new output variable
PositionW
to store the position in homogeneous coordinates. - Modified the w-component of
PositionW
to include the fog density. - Passed the
PositionW
value to the fragment shader.
- Added a new output variable
- Fragment Shader:
- Used the
PositionW
value to calculate the fog effect. - Applied the fog effect similarly by dividing the color by the depth value.
- Ensured the fog effect does not exceed the original color values.
- Used the
- Vertex Shader:
2. Improved Jitter Effect
- Jitter Parameter Adjustments
- Adjusted the calculation and application of the jitter effect to enhance the visual artifacts, making them more in line with PSX graphics.
- The jitter effect now scales with a smaller factor to better simulate the desired visual effect.
Files
action_psx_DX.js 6.3 kB
May 19, 2024
action_psx_GL.js 4.5 kB
May 19, 2024
Get CopperCube PSX Shader
Download NowName your own price
CopperCube PSX Shader
Try visuals of the original PlayStation era with this CopperCube shader.
Status | Released |
Category | Assets |
Author | SamGrady |
Tags | ambiera, coppercube, gamedev, PSX (PlayStation), Shaders |
More posts
- Dynamic Lighting and Enhanced Dithering!46 days ago
- Big update on PSX Shader FogAug 23, 2024
Leave a comment
Log in with itch.io to leave a comment.