gta-chaos-mod / ChaosModV

Chaos Mod for Grand Theft Auto V
https://gta5-mods.com/scripts/chaos-mod-v-beta
GNU General Public License v3.0
251 stars 90 forks source link

[Effect Suggestion] The Earth Is Round #3208

Open AntonioNoack opened 1 year ago

AntonioNoack commented 1 year ago

Name of effect

Duration (choose one and replace the corresponding "[ ]" with "[X]")

(medium maybe?)

Effect Description It uses vertex shaders (or whatever they are called in GTA) to offset the position downwards, the further you get from the camera, x² (as an approximation for a sphere, going from the very top)

so if y=down; delta = cameraPosition - vertexPosition, position.y -= factor * dot(delta,delta)

I have shader programming experience, but I have no experience with GTA modding, so I probably couldn't implement it myself

SRG27 commented 1 year ago

You don't need to do much non-shader stuff for a shader effect.

You could just copy-paste code of one of the existing simpler shader effects and change the hlsl source and effect info