Skip to content

Draw region grid in shader instead of gizmos #100

Description

@TokisanGames

Todo

  • Different color for defined regions, and no regions (white, grey or maybe white at .50% opacity)
  • Different color when the mouse is over it for add (green) and remove (red) when using the region tool (mouse tracking added in Compatibility renderer support #500)
  • Blue line for maximum bounds (though we may drop bounds in Implement Region Streaming #491)
  • Reduce the region gizmos to draw the add region square only when background mode = NONE and the mouse is in an empty space with no terrain mesh

Using the editor gizmos for regions is a bit ugly and doesn't occlude. This would look so much better if drawn directly on the terrain, which will traverse the heights and occlude when close. We could even inject that code into custom shaders when inside the editor.

image

A preview of shader based region grid is in the grid debug view shader. It nicely occludes and stays the same size regardless of distance. Just needs mouse position and highlight color and the region gizmo can be dispensed with.

image

However, we can't draw on the terrain where no terrain exists. So I'm not sure what to do about the grid for empty regions. Perhaps we do a hybrid and use gizmos for empty slots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions