Hey guys, sorry if this is the wrong place for this or if its against the rules. I've been following the blog posts for a while now and love what you guys are doing, the whole project looks really cool. I've been making my own terrian system in xna and have been getting some serious envy pangs each time i look at yours! I was wondering if you could give a little more detail (high level implimentation, no trade secrets!) on the haze band you use to mask where the land meets the skybox? I made a top and bottomless cylinder and a shader to give it a color and alpha gradient but it gets cut off by the land. at the bottom so it looks crap. I could get past this by rendering it to a different target and blending them in post processing but then we have z buffer issues where the band goes over mountains. The further i go into thinking about it the more complex the solution feels until it doesnt seem worth it... Anyway feel free to ignore me, just thought id throw a torch in the dark
Keep up the work, loving the blog!
Pete
Horizon haze technique
Re: Horizon haze technique
To make sure that the horizon band doesn't intersect the terrain, I just turn off depth testing! With depth testing disabled, nothing can get cut off by anything else -- it just layers on top.
Re: Horizon haze technique
Thanks for the tip I definitely want to do this but I'm thinking i want selective depth testing, where the band writes over the sea / land extension and the sky but doesn't overwrite geometry near the camera such as high mountains. I'm thinking of doing something like this; generate a depth map, then in the band shader if the depth is > a certain distance value then write the band color, else not. This way the band will appear distancy ( <- A REAL WORD I SWEAR) yet omnipresent. Not sure if it will work as I havent tried it but i just get the feeling its a little heavy handed
Thanks for your help!
Pete
Thanks for your help!
Pete