Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualBrother Bob

Posted 22 July 2013 - 12:27 PM

You mentioned that you are using a shader for this.  To me it looks like maybe there is a conditional switch causing a sharp cutoff for the specular highlights. 

 

Look for a conditional like this in the fragment shader.  Get rid of the 'if' statement if it's there, the highlights will look better and the shader will run faster as well. 

 

 

if(diffuse > 0.5)

{

specular = dot(halfVec, shininess);

}

 

 

Also, turn down shininess, it will spread the highlight out a bit so it spreads out around bumps a bit more,  it'll flicker less.

 

If you are using normal maps, blur them a bit in a 2D image editor and this will reduce the harsh flickering even more.


#2marcClintDion

Posted 22 July 2013 - 03:41 AM

There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.


#1marcClintDion

Posted 11 June 2013 - 06:24 AM

You mentioned that you are using a shader for this.  To me it looks like maybe there is a conditional switch causing a sharp cutoff for the specular highlights. 

 

Look for a conditional like this in the fragment shader.  Get rid of the 'if' statement if it's there, the highlights will look better and the shader will run faster as well. 

 

 

if(diffuse > 0.5)

{

       specular = dot(halfVec, shininess);

}

 

 

Also, turn down shininess, it will spread the highlight out a bit so it spreads out around bumps a bit more,  it'll flicker less.

 

If you are using normal maps, blur them a bit in a 2D image editor and this will reduce the harsh flickering even more.


PARTNERS