Jump to content

  • Log In with Google      Sign In   
  • Create Account

Rendering Fog in Night


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 duskndreamz   Members   -  Reputation: 141

Like
0Likes
Like

Posted 29 October 2012 - 02:47 AM

Hi,

I am trying to render Fog in my car game, but I am unable to get a good version going for Night mode.


[source lang="cpp"]GetDirectXDevice()->SetRenderState(D3DRS_FOGENABLE,true); GetDirectXDevice()->SetRenderState(D3DRS_RANGEFOGENABLE,true); if( m_iTimeOfDay > 2000 || m_iTimeOfDay < 400 ) // Render Black Fog GetDirectXDevice()->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_XRGB(0,0,0)); else GetDirectXDevice()->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_XRGB(255,255,255)); GetDirectXDevice()->SetRenderState(D3DRS_FOGVERTEXMODE,D3DFOG_LINEAR); //GetDirectXDevice()->SetRenderState(D3DRS_FOGDENSITY, *(DWORD *)(&newFogLevel)); GetDirectXDevice()->SetRenderState(D3DRS_FOGSTART,*(DWORD*)(&fFogStart)); GetDirectXDevice()->SetRenderState(D3DRS_FOGEND,*(DWORD*)(&fFogEnd));[/source]

Please suggest me some solution. I am currently not getting any fog when I switch on Night Mode.

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7991

Like
0Likes
Like

Posted 29 October 2012 - 04:14 AM

Please suggest me some solution.

Screenshots ?

#3 Tom KQT   Members   -  Reputation: 1621

Like
0Likes
Like

Posted 29 October 2012 - 06:47 AM

The white (day) fog is working, just the black (night) isn't?

Edited by Tom KQT, 29 October 2012 - 07:01 AM.


#4 InvalidPointer   Members   -  Reputation: 1443

Like
0Likes
Like

Posted 29 October 2012 - 08:18 AM

EDIT: Whoooops, thought Tom was the OP.

Edited by InvalidPointer, 29 October 2012 - 08:20 AM.

clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS