GUIStyle mystyle = new GUIStyle("some string from the list below");
- "CN Box"
- "Button"
| #ifndef __MATRIX_INCLUDED__ | |
| #define __MATRIX_INCLUDED__ | |
| #define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
| float4x4 inverse(float4x4 m) { | |
| float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
| float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
| float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
| float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |
| /* | |
| * Created by C.J. Kimberlin | |
| * | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2019 | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights |
| Shader "Name" { | |
| Properties { | |
| _Name ("display name", Range (min, max)) = number | |
| _Name ("display name", Float) = number | |
| _Name ("display name", Int) = number | |
| _Name ("display name", Color) = (number,number,number,number) | |
| _Name ("display name", Vector) = (number,number,number,number) |
| Shader "WorldNormalFromDepthTexture" | |
| { | |
| Properties { | |
| [KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
| LOD 100 |
| MarchingCubesGPU.cs: | |
| ... | |
| // DrawProceduralIndirect | |
| ComputeBuffer argsBuffer; | |
| [StructLayout(LayoutKind.Sequential)] | |
| struct DrawCallArgBuffer | |
| { | |
| public const int size = | |
| sizeof(int) + | |
| sizeof(int) + |
| Shader "Universal Render Pipeline/Custom/UnlitTexture" | |
| { | |
| Properties | |
| { | |
| [MainColor] _BaseColor("BaseColor", Color) = (1,1,1,1) | |
| [MainTexture] _BaseMap("BaseMap", 2D) = "white" {} | |
| } | |
| SubShader | |
| { |
| Shader "Universal Render Pipeline/Custom/UnlitTexture" | |
| { | |
| Properties | |
| { | |
| [MainColor] _BaseColor("BaseColor", Color) = (1,1,1,1) | |
| [MainTexture] _BaseMap("BaseMap", 2D) = "white" {} | |
| } | |
| SubShader | |
| { |
| // When creating shaders for Lightweight Render Pipeline you can you the ShaderGraph which is super AWESOME! | |
| // However, if you want to author shaders in shading language you can use this teamplate as a base. | |
| // Please note, this shader does not match perfomance of the built-in LWRP Lit shader. | |
| // This shader works with LWRP 5.7.2 version and above | |
| Shader "Lightweight Render Pipeline/Custom/Physically Based Example" | |
| { | |
| Properties | |
| { | |
| // Specular vs Metallic workflow | |
| [HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 |
| // Non Editor code | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public abstract class TrafficLightAttribute : PropertyAttribute | |
| { | |
| public bool DrawLabel = true; | |
| public string CustomLabel; | |
| public bool AlsoDrawDefault; |