Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: introduce a shading difference for a selection area in terrain

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2018

    introduce a shading difference for a selection area in terrain

    How can I introduce a difference in shading similar to the image below (taken from Civ5), where the selection is shaded slightly (with a circle outline) differently than the area outside. I understand I can change the look of some geometry by changing a parameter like the diffuse color. But, what I don't understand is how to render the same surface where only some part of the surface is different.

    Click image for larger version. 

Name:	ZeroOne_game_London_going_down.jpg 
Views:	12 
Size:	102.4 KB 
ID:	2884

  2. #2
    Intern Contributor
    Join Date
    Oct 2014
    There are probably multiple ways to achieve this effect. One way is to use multiple textures and mix them. With simple geometries like circles you can also write a fragment shader function that only adds the selection colour to the texture if the fragment is outside the circle.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts