Giter Site home page Giter Site logo

phi-lira / universalshaderexamples Goto Github PK

View Code? Open in Web Editor NEW
744.0 19.0 124.0 17.42 MB

Sand box project containing example shaders and assets compatible with Unity Universal Render Pipeline.

ShaderLab 77.44% HLSL 20.93% C# 1.64%
matcap unlit unity shaders realtime-shadows urp universal-render-pipeline unity-urp hlsl

universalshaderexamples's Introduction

Universal Shader Examples

This project contains a collection of shader examples for Universal Render Pipeline.

Requisites:

  • Unity 2019.3.9f1 or later
  • UniversalRP 7.3.1 or later
  • You need git-lfs to download the large asset files. Most Git client UI comes with support to git-lfs.

How to use this examples

  • Clone the repository. You must have git-lfs enabled.
  • Load in Unity.
  • Examples are located in _ExampleScenes folder. Each scene contains a different example bundled with shaders and materials.

Examples in this project

Unlit Examples

All unlit shader examples except the first one support realtime shadows (cast and receive).

01 UnlitTexture

Basic "hello world" shader. UnlitTexture

02 UnlitTexture + Realtime Shadows

Unlit with support for receiving and casting realtime shadows. UnlitTextureShadows

03 Matcap

Matcap with support of per-pixel normals. Matcap

04 Screen Space UV

Screen space uv texture mapping. SceenSpaceUV

Lit Examples

50 Baked Lighting Only

No direct lighting. Global Illumination (skylight + SH and Lightamps) + realtime shadows. UnlitTexture

51 Lit Physically Based

Physically Based Lit shader supporting metallic workflow. LitPhysicallyBased

52 Cleat Coat Physically Based

Cleat Coat Physically Based evaluates a second BDRF for thin coat layer. LitPhysicallyBased

From left to right: car flakes, carbon filter, lacquered wood.

Top spheres are without the coat layer, using the standard Lit Physically Based shader.

Bottom spheres are with the Clear Coat Physically Based shader.

Resources

universalshaderexamples's People

Contributors

phi-lira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

universalshaderexamples's Issues

Shader error

Shader error in 'Universal Render Pipeline/Custom/Clear Coat': redefinition of 'LightingData' at Assets/ShaderLibrary/CustomShading.hlsl(50) (on d3d11)

Compiling Subshader: 0, Pass: <Unnamed Pass 0>, Vertex program with _MAIN_LIGHT_SHADOWS _NORMALMAP
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED LIGHTMAP_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _MAIN_LIGHT_SHADOWS_CASCADE _SHADOWS_SOFT

Unity 2022.3.6f1
URP 14.0.8

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.