This repository was archived by the owner on Nov 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 13 files changed +48
-13
lines changed Expand file tree Collapse file tree 13 files changed +48
-13
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ private void Apply(BuildTarget target)
103
103
resources . shaders . scalableAO = null ;
104
104
}
105
105
106
- if ( stripping . stripUnsupportedShaders && ! RuntimeUtilities . supportsMotionVectors )
106
+ if ( stripping . stripUnsupportedShaders && ! SystemInfo . supportsMotionVectors )
107
107
{
108
108
resources . shaders . motionBlur = null ;
109
109
resources . shaders . temporalAntialiasing = null ;
Original file line number Diff line number Diff line change @@ -71,12 +71,20 @@ public override bool IsEnabledAndSupported(PostProcessRenderContext context)
71
71
72
72
if ( mode . value == AmbientOcclusionMode . ScalableAmbientObscurance )
73
73
{
74
- state &= ! RuntimeUtilities . scriptableRenderPipelineActive ;
74
+ state &= ! RuntimeUtilities . scriptableRenderPipelineActive
75
+ && context . resources . shaders . scalableAO
76
+ && context . resources . shaders . scalableAO . isSupported ;
75
77
}
76
78
else if ( mode . value == AmbientOcclusionMode . MultiScaleVolumetricObscurance )
77
79
{
78
80
#if UNITY_2017_1_OR_NEWER
79
81
state &= SystemInfo . supportsComputeShaders
82
+ && context . resources . shaders . multiScaleAO
83
+ && context . resources . shaders . multiScaleAO . isSupported
84
+ && context . resources . computeShaders . multiScaleAODownsample1
85
+ && context . resources . computeShaders . multiScaleAODownsample2
86
+ && context . resources . computeShaders . multiScaleAORender
87
+ && context . resources . computeShaders . multiScaleAOUpsample
80
88
&& SystemInfo . SupportsRenderTextureFormat ( RenderTextureFormat . RFloat )
81
89
&& SystemInfo . SupportsRenderTextureFormat ( RenderTextureFormat . RHalf )
82
90
&& SystemInfo . SupportsRenderTextureFormat ( RenderTextureFormat . R8 ) ;
Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ public override bool IsEnabledAndSupported(PostProcessRenderContext context)
40
40
{
41
41
return enabled . value
42
42
&& SystemInfo . supportsComputeShaders
43
- && SystemInfo . SupportsRenderTextureFormat ( RenderTextureFormat . RFloat ) ;
43
+ && SystemInfo . SupportsRenderTextureFormat ( RenderTextureFormat . RFloat )
44
+ && context . resources . shaders . autoExposure
45
+ && context . resources . shaders . autoExposure . isSupported
46
+ && context . resources . computeShaders . exposureHistogram ;
44
47
}
45
48
}
46
49
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ internal bool IsEnabledAndSupported(PostProcessRenderContext context)
21
21
return enabled
22
22
&& RenderSettings . fog
23
23
&& ! RuntimeUtilities . scriptableRenderPipelineActive
24
+ && context . resources . shaders . deferredFog
25
+ && context . resources . shaders . deferredFog . isSupported
24
26
&& context . camera . actualRenderingPath == RenderingPath . DeferredShading ; // In forward fog is already done at shader level
25
27
}
26
28
Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ public override bool IsEnabledAndSupported(PostProcessRenderContext context)
52
52
&& context . camera . actualRenderingPath == RenderingPath . DeferredShading
53
53
&& SystemInfo . supportsMotionVectors
54
54
&& SystemInfo . supportsComputeShaders
55
- && SystemInfo . copyTextureSupport > CopyTextureSupport . None ;
55
+ && SystemInfo . copyTextureSupport > CopyTextureSupport . None
56
+ && context . resources . shaders . screenSpaceReflections
57
+ && context . resources . shaders . screenSpaceReflections . isSupported
58
+ && context . resources . computeShaders . gaussianDownsample ;
56
59
}
57
60
}
58
61
Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ internal override bool NeedsHalfRes()
53
53
return true ;
54
54
}
55
55
56
+ internal override bool ShaderResourcesAvailable ( PostProcessRenderContext context )
57
+ {
58
+ return context . resources . computeShaders . gammaHistogram ;
59
+ }
60
+
56
61
internal override void Render ( PostProcessRenderContext context )
57
62
{
58
63
CheckOutput ( width , height ) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ public sealed class LightMeterMonitor : Monitor
11
11
// Note: only works with HDR grading, as this monitor only makes sense when working in HDR
12
12
public bool showCurves = true ;
13
13
14
+ internal override bool ShaderResourcesAvailable ( PostProcessRenderContext context )
15
+ {
16
+ return context . resources . shaders . lightMeter && context . resources . shaders . lightMeter . isSupported ;
17
+ }
18
+
14
19
internal override void Render ( PostProcessRenderContext context )
15
20
{
16
21
CheckOutput ( width , height ) ;
Original file line number Diff line number Diff line change @@ -14,12 +14,15 @@ public abstract class Monitor
14
14
15
15
internal bool requested = false ;
16
16
17
- public bool IsRequestedAndSupported ( )
17
+ public bool IsRequestedAndSupported ( PostProcessRenderContext context )
18
18
{
19
19
return requested
20
- && SystemInfo . supportsComputeShaders ;
20
+ && SystemInfo . supportsComputeShaders
21
+ && ShaderResourcesAvailable ( context ) ;
21
22
}
22
23
24
+ internal abstract bool ShaderResourcesAvailable ( PostProcessRenderContext context ) ;
25
+
23
26
internal virtual bool NeedsHalfRes ( )
24
27
{
25
28
return false ;
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ internal override bool NeedsHalfRes()
33
33
return true ;
34
34
}
35
35
36
+ internal override bool ShaderResourcesAvailable ( PostProcessRenderContext context )
37
+ {
38
+ return context . resources . computeShaders . vectorscope ;
39
+ }
40
+
36
41
internal override void Render ( PostProcessRenderContext context )
37
42
{
38
43
CheckOutput ( size , size ) ;
Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ internal override bool NeedsHalfRes()
45
45
return true ;
46
46
}
47
47
48
+
49
+ internal override bool ShaderResourcesAvailable ( PostProcessRenderContext context )
50
+ {
51
+ return context . resources . computeShaders . waveform ;
52
+ }
53
+
48
54
internal override void Render ( PostProcessRenderContext context )
49
55
{
50
56
// Waveform show localized data, so width depends on the aspect ratio
You can’t perform that action at this time.
0 commit comments