GithubHelp home page GithubHelp logo

jevonshi / gpu-line-of-sight Goto Github PK

View Code? Open in Web Editor NEW

This project forked from entropi-games/gpu-line-of-sight

0.0 0.0 0.0 1.21 MB

GPU Line of Sight / Field of View visualization for Unity

License: Apache License 2.0

C# 87.41% HLSL 1.51% ShaderLab 11.08%

gpu-line-of-sight's Introduction

GPU-Line-of-Sight

GPU Line of Sight / Field of View visualization for Unity

Description

This asset allows you to easily add line of sight / field of view visualization to your Unity project.

All rendering is done on the GPU, making this system incredibly fast and allowing an unlimited amount of line of sights sources. It is perfectly suited for top-down stealth or action games, but also works from other viewpoints and in other type of games. The effect can be tweaked to achieve any desired visual style.

GPU_LOS_Screen01

GPU_LOS_Screen02

GPU_LOS_Screen03

GPU_LOS_Screen04

A line of sight system visualizes which parts of the game world can be seen from the standpoint of for example a 3rd person in-game character. The area outside of the line of sight is obscured and remains hidden from the player.

This system was developed as an alternative to CPU based line of sight visualizations. CPU based systems use a combination of ray casting and dynamic meshes to compute the line of sight and are often CPU intensive, resulting in a serious impact on performance.

This new GPU based line of sight system uses a technique very similar to shadow mapping and is significantly faster than any CPU based system, freeing up valuable CPU time. It has been designed from the ground up with performance, ease-of-use and customizability in mind. The user can control the look of the effect by selecting which image effects are applied to the area outside of the line of sight.

Main Features

  • Performance: Designed with performance in mind, zero allocation during run-time
  • Customization: Customize the effect so that it matches the visual style of your project seamlessly
  • Editor preview: The effect is previewed inside the scene editor, so tweaking is easy and straightforward
  • Visibility checking: Includes scripts to check if objects are inside the line of sight
  • Documentation: Includes full documentation and an extensive example scene

Supported

  • Unity version 5.2 and above
  • Forward and deferred rendering pipelines
  • DX11

NOT Supported

  • Scriptable Render Pipelines (URP, HDRP)
  • Sprite or 2D toolkit based projects
  • Mobile and WebGL platforms

gpu-line-of-sight's People

Contributors

entropigames avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.