texture2D() is deprecated on GLSL 330
NOTE: It requires a depth texture as input, it should be configured on rlgl, by default RenderTexture (fbo) uses Depth Renderbuffer instead of Depth Texture. Check rlglLoadRenderTexture()