Skip to content

Commit d73a071

Browse files
Thomas Deliotthomasdeliot
Thomas Deliot
authored and
thomasdeliot
committed
Initial commit
0 parents  commit d73a071

9 files changed

+4526
-0
lines changed

ProceduralStochasticTexturing/Editor/StandardStochasticShaderGUI.cs

Lines changed: 1757 additions & 0 deletions
Large diffs are not rendered by default.

ProceduralStochasticTexturing/StandardStochastic.shader

Lines changed: 485 additions & 0 deletions
Large diffs are not rendered by default.

ProceduralStochasticTexturing/StandardStochasticSpecular.shader

Lines changed: 480 additions & 0 deletions
Large diffs are not rendered by default.

ProceduralStochasticTexturing/UnityStandardStochasticCore.cginc

Lines changed: 731 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
2+
// ----------------------------------------------------------------------------
3+
// Modified Unity Standard Shader for Procedural Stochastic Textures
4+
// 2019 Unity Labs
5+
// Paper: https://eheitzresearch.wordpress.com/722-2/
6+
// Technical chapter: https://eheitzresearch.wordpress.com/738-2/
7+
// Authors:
8+
// Thomas Deliot <thomasdeliot@unity3d.com>
9+
// Eric Heitz <eric@unity3d.com>
10+
// This software is a research prototype adapted for Unity in the hopes that it
11+
// will be useful, but without any warranty of usability or maintenance. The
12+
// comments in the code refer to specific sections of the Technical chapter.
13+
// ----------------------------------------------------------------------------
14+
15+
#ifndef UNITY_STANDARD_CORE_FORWARD_INCLUDED
16+
#define UNITY_STANDARD_CORE_FORWARD_INCLUDED
17+
18+
#if defined(UNITY_NO_FULL_STANDARD_SHADER)
19+
# define UNITY_STANDARD_SIMPLE 1
20+
#endif
21+
22+
#include "UnityStandardConfig.cginc"
23+
24+
#if UNITY_STANDARD_SIMPLE
25+
#include "UnityStandardStochasticCoreForwardSimple.cginc"
26+
VertexOutputBaseSimple vertBase (VertexInput v) { return vertForwardBaseSimple(v); }
27+
VertexOutputForwardAddSimple vertAdd (VertexInput v) { return vertForwardAddSimple(v); }
28+
half4 fragBase (VertexOutputBaseSimple i) : SV_Target { return fragForwardBaseSimpleInternal(i); }
29+
half4 fragAdd (VertexOutputForwardAddSimple i) : SV_Target { return fragForwardAddSimpleInternal(i); }
30+
#else
31+
#include "UnityStandardStochasticCore.cginc"
32+
VertexOutputForwardBase vertBase (VertexInput v) { return vertForwardBase(v); }
33+
VertexOutputForwardAdd vertAdd (VertexInput v) { return vertForwardAdd(v); }
34+
half4 fragBase (VertexOutputForwardBase i) : SV_Target { return fragForwardBaseInternal(i); }
35+
half4 fragAdd (VertexOutputForwardAdd i) : SV_Target { return fragForwardAddInternal(i); }
36+
#endif
37+
38+
#endif // UNITY_STANDARD_CORE_FORWARD_INCLUDED

0 commit comments

Comments
 (0)