A few random screenshots

Started by
11 comments, last by george7378 11 years, 2 months ago

OK, I've been trying out some fog - I tried the following simple code:

    d3ddev->SetRenderState(D3DRS_FOGENABLE, true); //Enable fog
    d3ddev->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_XRGB(255, 255, 255)); //Make the fog white
    d3ddev->SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_LINEAR); //Set simple linear pixel fog
    d3ddev->SetRenderState(D3DRS_FOGSTART,*(DWORD*)(&fogStart)); //Fog starts here
    d3ddev->SetRenderState(D3DRS_FOGEND,*(DWORD*)(&fogEnd)); //Fog ends here

fogStart is 20.0f and fogEnd is 60.0f. It looks pretty decent when I look out towards the horizon, but it also renders fog in every other direction too - I can also see it in the corners of the skybox and over my head. Is there a simple way to constrain it to the horizon only?

Thanks!

Advertisement

So how much does it cost to spend a weekend on this island hehe ? smile.png I'll be keeping an eye on your project mate cause I really like what you're going for. I've always liked to go exploring without restrictions in games.

Make me an offer :D Thanks - I'm hoping it might turn into something that I can eventually release - at the moment I'm trying to get some sort of solid foundation 'engine' from which to work. I've just managed to get some (really basic) collision detection going, which is an improvement! Maybe I can make it into a more game-like program by adding the ability to interact with stuff, go places, etc... in the future!

This topic is closed to new replies.

Advertisement