-
Notifications
You must be signed in to change notification settings - Fork 40
/
VolumeStandard.shader
70 lines (59 loc) · 1.73 KB
/
VolumeStandard.shader
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Shader "OpenVDB/Standard"
{
Properties
{
_Volume ("Volume", 3D) = "" {}
_Intensity ("Intensity", Range(0.1, 2.0)) = 0.3
_StepDistance ("StepDistance", Range(0.01, 0.05)) = 0.01
_ShadowSteps ("ShadowSteps", Range(1, 64)) = 32
_ShadowDensity ("ShadowDensity", Color) = (0.4, 0.4, 0.4, 1)
_ShadowThreshold ("ShadowThreshold", Range(0.001, 0.1)) = 0.001
_AmbientColor ("AmbientColor", Color) = (0.4, 0.4, 0.5, 1)
_AmbientDensity ("AmbientDensity", Range(0, 1)) = 0.2
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 0
}
CGINCLUDE
#define ENABLE_CAMERA_INSIDE_CUBE
#define ENABLE_SAMPLING_START_OFFSET
#define ENABLE_TRACE_DISTANCE_LIMITED
#define ENABLE_DIRECTIONAL_LIGHT
#define ENABLE_AMBIENT_LIGHT
ENDCG
SubShader
{
Tags
{
"Queue"="Transparent"
}
Cull [_Cull]
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
Tags
{
"RenderPipeline" = "HDRenderPipeline"
"RenderType"="Transparent"
}
ZWrite On
CGPROGRAM
#include "./VolumeStandard.cginc"
#pragma vertex vert
#pragma fragment frag
ENDCG
}
// TODO:: Implement the ShadowCaster Pass for HDRP
/*
Pass
{
Tags{ "LightMode" = "ShadowCaster" }
CGPROGRAM
#include "./VolumeShadowCaster.cginc"
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_shadowcaster
// #pragma fragmentoption ARB_precision_hint_fastest
ENDCG
}
*/
}
}