View Single Post
Old 11-01-10, 08:02 AM   #29
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by sober View Post
I can get rid of the banding completely by deleting the gradiant but it deletes the sun as well .
based on the posted shader function above, set the interpolate value in the lerp() function to a constant value. That ought to repeal the individual gradients but does not affect the pixel color for the sun.

change from:
Code:
 // 1. base gradient, from top to bottom    
 float heightRatio = pow(In.eyeDir.w / 992.0, g_skyBottomColor.w);    
 color = lerp(g_skyBottomColor.rgb, g_skyTopColor.rgb, heightRatio);
to:

Code:
// 1. base gradient, from top to bottom    
// float heightRatio = pow(In.eyeDir.w / 992.0, g_skyBottomColor.w);    
color = lerp(g_skyBottomColor.rgb, g_skyTopColor.rgb, 1 /*heightRatio*/);
I can not say if it work and/or how it will look in the game, I have SH5 not installed on my PC.
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler is offline   Reply With Quote