yum-archive/Tooner

A toon shader for Unity's BIRP.

git clone https://git.yummers.dev/yum-archive/Tooner

yumFog now uses object coordinates47579d9

master
2.7 KiB87 linesraw
1#ifndef LTCGI_CONFIG_INCLUDED
2#define LTCGI_CONFIG_INCLUDED
3
4// Feel free to enable or disable (//) the options here.
5// They will apply to all LTCGI materials in the project.
6// Most of these can be changed in the LTCGI_Controller editor as well.
7
8/// No specular at all.
9//#define LTCGI_SPECULAR_OFF
10/// No diffuse at all.
11//#define LTCGI_DIFFUSE_OFF
12/// Disable the ability to toggle specular/diffuse on or off per screen.
13#define LTCGI_TOGGLEABLE_SPEC_DIFF_OFF
14
15/// Only use LTC diffuse mode, never lightmapped diffuse.
16/// This disables lightmaps entirely.
17#define LTCGI_ALWAYS_LTC_DIFFUSE
18
19/// Double-sample screen texture for diffuse lighting to smooth resulting lighting
20/// a bit more with global screen color data. Slight performance cost.
21//#define LTCGI_BLENDED_DIFFUSE_SAMPLING
22
23/// Disable extra specular detail LUT, saves a sampler.
24#define LTCGI_DISABLE_LUT2
25
26/// Use bicubic filtering for LTCGI lightmap. Recommended on.
27#define LTCGI_BICUBIC_LIGHTMAP
28
29/// Lightmap values below this will be treated as black for specular/LTC diffuse.
30#define LTCGI_LIGHTMAP_CUTOFF 0.1
31/// Lightmap values above this (plus cutoff) will be treated as white.
32#define LTCGI_SPECULAR_LIGHTMAP_STEP 0.3
33
34/// Distance multiplier for calculating blur amount.
35/// Increase to make reflections blurrier faster as distance increases.
36#define LTCGI_UV_BLUR_DISTANCE 333
37
38/// Fall back to LTC diffuse (from LM diffuse) on objects that are not marked static.
39#define LTCGI_LTC_DIFFUSE_FALLBACK
40
41/// Approximation to ignore diffuse light for far away
42/// lights, increase MULT or disable if you notice artifacting
43#define LTCGI_DISTANCE_FADE_APPROX
44/// Distance at which diffuse from screens will be ignored.
45#define LTCGI_DISTANCE_FADE_APPROX_MULT 50
46
47
48// disabled editor from here on out
49///
50
51
52// automatically kept in sync with LTCGI_Controller.cs
53#define MAX_SOURCES 16
54
55// set according to the LUT specified on CONTROLLER
56#define LUT_SIZE 256
57static float LUT_SCALE = (LUT_SIZE - 1.0)/LUT_SIZE;
58const float LUT_BIAS = 0.5/LUT_SIZE;
59
60// will be set automatically if audiolink is available and in use
61//#define LTCGI_AUDIOLINK
62
63#ifdef LTCGI_AUDIOLINK
64#ifndef AUDIOLINK_WIDTH
65#ifndef AUDIOLINK_CGINC_INCLUDED
66#include "Packages/at.pimaker.ltcgi/Shaders/LTCGI_AudioLinkNoOp.cginc"
67#define AUDIOLINK_CGINC_INCLUDED
68#endif
69#endif
70#endif
71
72// Bake screen data into texture for better performance. Disables moveable screens.
73#define LTCGI_STATIC_UNIFORMS
74
75// Allow statically textured lights.
76#define LTCGI_STATIC_TEXTURES
77
78// Enable support for cylindrical screens.
79//#define LTCGI_CYLINDER
80
81// Activate avatar mode, which overrides certain configs from above.
82//#define LTCGI_AVATAR_MODE
83
84// Slightly simplified and thus faster sampling for reflections at the cost of quality.
85//#define LTCGI_FAST_SAMPLING
86
87#endif