How To Make A Ps1 Style Game
How to create a PS1 rendering style shader in UE4
Introduction
Back in the one-time days PSX games had a shaky and wobbly upshot of vertices, this unwanted effect is acquired by the lack of floating point precision.
The PSX's hardware just allow fixed point adding so when the camera is moving or an object is moving, any given vertex stays in its position until information technology's shut to the adjacent position and suddenly snap to it, present graphics hardware tin interpolate vertices between two position smoothly thanks to more floating point precision that is available.
Nosotros assume you have already created a projection set to test the shader or you lot already have a project that you want to utilise the effect in information technology. The minimum y'all must have is a mesh with material practical to it.
Preview
You lot can download the consummate project at the end of this tutorial then you can check it at your own pace, you volition find everything documented.
Step ane: Create a fabric parameter collections
Material parameter collections is an asset that store global parameters (a set of scalar and vector parameters) that you can reference in any cloth. For example current of air direction and strength can be referenced by all foliage's materials. To read more than, check this link.
To create a new material parameter collections assets, in content browser right click and go to Materials & Textures > Material Parameter Collection.
Next add together two scalar parameters, Global_PSXEffect_3dGridCellSize & Global_PSXEffect_PixelizationAmount
Hit save and close the window.
Stride 2: Create material function
The function PSXEffect_Function render a vertex offset information, we use it to first vertices for the shaky effect. The function also pixelate UV data, we plug the return value in Texture Sample node to have a pixelated texture.
Observe that we used the parameters we created previously in material parameter collections.
To empathize how we shake the vertices, imagine a 3D filigree around your mesh, and vertices snaps the the closest points in that grid.
Step 3: Add PSXEffect_Function to y'all materials
It's easy to add a function to a textile. You can add information technology by left click in the material editor and type the proper name of the function.
Source File
That'due south all folks ! Thanks for reading. If you have whatever questions driblet a comment here or bring together me on Discord.
Source: https://gamedevworks.com/ue4/ps1-rendering-style-in-ue4/
Posted by: cottonsweves.blogspot.com
0 Response to "How To Make A Ps1 Style Game"
Post a Comment