shaderG3 updates, moving some processes to the shaders
fixing segmentation fault bug