How to make PSX style 100% Visual Shader? (vertex wobble/vertex snapping only nodes)

Godot Version

4.3 (or any visual shader version)

Question

How to make PSX Visual Shader? (vertex wobble/vertex snapping only nodes)

I am attempting to copy these shaders in Godot:

  1. GitHub - Math-Man/URP-PSX-FORKED: PSX retro graphics plugin for URP with Shadergraph in Unity

or similar ones

I kind of got the first one to “work” but it was broken in alot of ways, mostly the origin of the mesh wasn’t centered and would float away as camera rotated. The issue I am seeing is there are some nodes that I cant recreate certain calculations with.

here is a shader made in godot 4 that works, but is shader code:

The issue with this one was in recreating the

vec4 snap_to_position(vec4 base_position)

functionality, specifically what I see is

snapped_position.xyz = base_position.xyz / base_position.w;

im not really sure how to go about this

(PROJECTION_MATRIX * MODELVIEW_MATRIX * vec4(VERTEX, 1.0))

this is passed into that function, this wouldn’t be as straight forward, because those two use matrix which are not just vec4, using the transformvecmult node, it provides a vec 3. Im very confused, anyone have any attempts on this or know of a resource for solving this using just Godot Visual shaders only (can easily do with shader code but I just want to use visual shader code only)?