This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading; | |
class BitmapEncoder | |
{ | |
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on tutorial: | |
// https://learnopengl.com/#!Advanced-Lighting/Parallax-Mapping | |
Shader "Custom/ParallaxMapping" | |
{ | |
Properties | |
{ | |
_MainTex ("Diffuse", 2D) = "white" {} | |
_NormalMap ("Normal", 2D) = "white" {} | |
_NormalActive ("NormalActive", Int) = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.LWRP; | |
// Inheriting from `ScriptableRendererFeature` will add it to the | |
// `Renderer Features` list of the custom LWRP renderer data asset. | |
public class RenderMyCustomPass : ScriptableRendererFeature | |
{ | |
private class MyCustomPass : ScriptableRenderPass | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/UnlitTexture" | |
{ | |
Properties | |
{ | |
[MainColor] _BaseColor("BaseColor", Color) = (1,1,1,1) | |
[MainTexture] _BaseMap("BaseMap", 2D) = "white" {} | |
} | |
// Universal Render Pipeline subshader. If URP is installed this will be used. | |
SubShader |