Questions About Ffar

Atmospheric scattering OpenGL 3.3

enter image description here

Im currently trying to convert a shader by Sean O'Neil to version 330 so i can try it out in a application im writing. Im having some issues with deprecated functions, so i replaced them, but im almost completely new to glsl, so i probably did a mistake somewhere.

Original shaders can be found here:

My horrible attempt at converting them:

Vertex shader:

#version 330 core

// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 2) in vec3 vertexNormal_modelspace;

uniform vec3 v3CameraPos;       // The camera's current