Giter Club home page Giter Club logo

urp-sun-shafts's Introduction

URP Sun Shafts

A URP port of Unity's classic Standard Assets Effects package's Sun Shaft effect.

Sample Image The effect can be subtle, but when done well can add some much needed vibrancy to a scene.

Heads Up

This asset was created with URP 10.4.0, but it should work on any version of URP that has custom renderer feature capabilities.

Install

Download the latest version from Releases.
Open the Unity project you want the package installed in.
Open the package to install into the project's Plugins folder.

Usage

In your Forward Renderer asset, add the Sun Shafts render feature.

  • Pass Event controls when the feature will render. Leave this at Before Rendering Post Processing if you're not doing anything wacky with the rendering order.

  • Sun Shaft Material is the material used for the effect. Assign URP Sun Shafts material to the field, located in Plugins/URP Sun Shafts/Materials by default

  • Render Mode controls how the effect is created. Depth mode will only work if the URP asset has the depth option enabled. Otherwise it can be created from a skybox or the camera background color.

  • Resolution controls how large the render textures created are. High is full size, Normal is 1/4th size, and Low is 1/16th size. Lower settings will create a blurrier effect.

  • Blend Mode controls how the effect is blended on top of the scene. Screen is more subtle than Add.

  • Depth Threshold controls how much depth or color difference is required for the effect to appear. A lower value will make the effect more prominent.

  • Opacity controls the opacity of the entire effect.

  • Sun Position controls the position of the sun in world space. It's recommended to put this whereever your main light is located.

  • Radial Blur Iterations controls how many times the render texture is resampled. A larger number will give a larger blur.

  • Sun Color controls the color of the sun and the shafts.

  • Sun Threshold controls what colors do not emit shafts. For example, if set to red, any red pixels will not create the effect, but other colors will. This takes some trial and error to get the value right.

  • Sun Blur Radius controls how blurry the shafts will be.

  • Sun Intensity controls how intense the sun is.

  • Max Radius controls the maximum size of the effect relative to the screen.

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.