guess you could also solve it via stencil buffer. If pixel does not change, clip it, otherwise write one (or something else) in there. You can then use the stencil buffer to mask out only the changed/unchanged pixels.
I decided to take a closer look at atmospheric scattering in my master thesis. I guess everyone who is interested in this kind of topic once stumbled over Bruneton's precomputed atmospheric scattering model (paper found here), as it is considered the most accurate and realistic scattering model to date. While the paper itself is really good, its a bit short and only introduces the general idea (as most papers do). Although, Bruneton provides the associated source code on his homepage, many people (including me) had problems understanding how it really works. I dont know how many hours (or even days) I was sitting in front of some equations trying to figure out what they are supposed to do.
Fortunately, many people on this forum helped me in understanding the code and therefore I want to give something back to the community by sharing my master thesis which is called "Deferred Rending of Planetary Terrains with Accurate Atmospheres". It can be found on my homepage (direct link can be found here).
In my thesis I was really trying to explain all the tricky parts of Bruneton's scattering model in an "easy" way and to create a document, I wished to have back then. I guess this is also the reason, why it reads almost like an tutorial, rather than an academic work.
In this way I want to thank again the community for helping me during my studies. I really hope my thesis will prove useful to many of you. Last but not least, some screenshots of my results (video can be found here)
i would need more than 2 clipping planes in my vertex shader, but if I am trying to declare something like "float plane2 : SV_CLIPDISTANCE2;" in my vertex-output-struct, it results in an error saying: "invalid output semantic 'SV_CLIPDISTANCE2': Legal indices are in [0,1]".
So i read in the directx docs that you can increase these value but i dont understand how this can be accomplished:
doc says: "The combined clip and cull distance values are at most D3D#_CLIP_OR_CULL_DISTANCE_COUNT components in at most D3D#_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT registers. Writable in the Vertex and Geometry shaders."
how exactly can I write these values in vertex shaders?