Shader "MaterialPropertyDrawer"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
[HideInInspector] _MainTex2("Hide Texture", 2D) = "white" {}
This file contains hidden or 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
| [KeywordEnum(Off, On)] _UseSomething ("Use Something",float) = 0 | |
| #pragma shader_feature _USESOMETHING_ON | |
| #pragma shader_feature _USESOMETHING_OFF | |
| #ifdev _USESOMETHING_ON | |
| .. | |
| #endif | |
| public void ToggleSomething(bool state) | |
| { |
This file contains hidden or 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
| hader "Unlit/GridOverlay" | |
| { | |
| Properties | |
| { | |
| _GridSize("Grid Size", Float) = 10 | |
| _Grid2Size("Grid 2 Size", Float) = 160 | |
| _Grid3Size("Grid 3 Size", Float) = 320 | |
| _Alpha ("Alpha", Range(0,1)) = 1 | |
| } | |
| SubShader |
This file contains hidden or 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
| // PURPOSE: convert draco-pnts to glb (ie. 3dTiles v1.0 to v1.1) | |
| // INSTALL: npm install draco3d gltfpack | |
| // RUN: | |
| // > node infolderPNTS outfolderGLB | |
| import fs from 'fs'; | |
| import draco3d from 'draco3d'; | |
| import gltfpack from 'gltfpack'; | |
| const inFolder = process.argv.slice(2)[0] || 'infolder'; |
This file contains hidden or 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
| import { Document, NodeIO, Primitive } from '@gltf-transform/core'; | |
| const document = new Document(); | |
| const buffer = document.createBuffer(); | |
| const position = document.createAccessor() | |
| .setType('VEC3') | |
| .setBuffer(buffer) | |
| .setArray(new Float32Array([ | |
| 0, 0, 0, // ax,ay,az |
This file contains hidden or 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 "Points/Billboard" | |
| { | |
| Properties | |
| { | |
| _PointSize("PointSize", Range(0, 0.1)) = 0.01 | |
| [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend("Source Blend", Float) = 1 // "One" | |
| [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend("Destination Blend", Float) = 0 // "Zero" | |
| [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest("Depth Test", Float) = 4 // "LessEqual" | |
| [Enum(DepthWrite)] _ZWrite("Depth Write", Float) = 1 // "On" | |
| } |
This file contains hidden or 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
| // https://discussions.unity.com/t/multiple-camera-screenshots/481847/13 | |
| public void Screenshot() | |
| { | |
| foreach (GameObject go in GameObject.FindGameObjectsWithTag("picCam")) | |
| { | |
| Camera cam = go.GetComponent<Camera>(); | |
| resWidth = cam.pixelWidth; | |
| resHeight = cam.pixelHeight; | |
| RenderTexture rt = new RenderTexture(resWidth, resHeight, 24); | |
| cam.targetTexture = rt; |
This file contains hidden or 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 UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.LowLevel; | |
| using System.Linq; | |
| using System.Threading; | |
| namespace EditorUtils { | |
| // | |
| // Serializable settings |
Script to add all items from quixel
As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)
Note: This script only tested in the latest version of Chrome.
- Copy the script from below (
run.js) - Login into https://quixel.com
This file contains hidden or 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
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
