Sign in to follow this  

glFog causing solid colour rendering

Recommended Posts

[b]Problem Solved:[/b]
Density was too high. Dropped it to 0.002 and it was fine.

[b]Problem:[/b]When using glFog everything is rendered in solid colour and I don't know why

In my initialization function I have

And I have this in my render function directly after glLoadIdentity()

GLfloat fogColor[]= {0.5f, 0.5f, 0.5f, 1.0f};
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_DENSITY, 0.3);

Without Fog:

With Fog:

Share this post

Link to post
Share on other sites
[quote name='mhagain' timestamp='1305989219' post='4813860']
Your fog density looks too high. Try dropping it to something much lower; start at 0.01 and experiment with values until you find one that looks good.

I managed to fix it earlier, thanks anyway though.
I also updated the thread, well, tried to update it, seeing as the edit post is still open in a different tab, looks like i forgot to finalize it XD

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this