- Home /
 
 
               Question by 
               niallmc · Aug 31, 2016 at 03:11 PM · 
                c#2dproceduralprocedural meshprocedural generation  
              
 
              How to darken a procedurally added texture (explained below)
The terrain within my 2D game is procedurally generated using mid-point displacement. As displayed below, the terrain is generated as a mesh and a texture is applied to it (this can be seen in the blue terrain in the image below). 
The result I am hoping for is seen in the following picture. I want to darken this terrain below a certain point below the main height-map of the terrain, to make it smoothly fade to black.
I have no idea how to achieve this effect on a procedural terrain (differing heightmap created in each level). Was hoping someone could point me in the right direction.
Thanks in advance!

 
                 
                screenpurple1.jpg 
                (220.5 kB) 
               
 
                
                 
                screenpurple2.jpg 
                (188.5 kB) 
               
 
              
               Comment
              
 
               
              Your answer