Showing posts from July, 2017

Atmosphere Rendering, part 2

Still doing work on my Atmosphere Shader, however it's proven to be quite the resource hog! The current implementation is a fairly typical screen-space shader.  It ray-traces the light from the sun through the atmosphere until it hits the current pixel fragment, calculating the sun transmittance along this ray.  Then it marches that ray towards the camera, blending it over the background performing in and out-scattering again until it reaches the final fragment colour. Incorporating Mie and Rayleigh scattering in the ray-tracing gives the following results : Adding the clouds into the mix (as a prototype) gives results with I think outstanding potential.  However the added number of calculations in the shader pretty much takes it to breaking point, so much that I can't even prototype what it will finally look like, because I have to reduce the number of ray-marching steps in the shader.   Put simply, the shader is brute-force ray-tracing with no real optimisat