Skip to content

Commit 0af3690

Browse files
committed
updates to StandardAssets/ImageEffects from project upgrade
1 parent b6ff25a commit 0af3690

File tree

9 files changed

+24
-8
lines changed

9 files changed

+24
-8
lines changed

Unity/SCANsat/Assets/Editor/ImageEffects.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Unity/SCANsat/Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public override void OnInspectorGUI () {
7777
// display info text when screen blend mode cannot be used
7878
Camera cam = (target as BloomAndFlares).GetComponent<Camera>();
7979
if (cam != null) {
80-
if (screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) {
80+
if (screenBlendMode.enumValueIndex==0 && ((cam.allowHDR && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) {
8181
EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info);
8282
}
8383
}

Unity/SCANsat/Assets/Editor/ImageEffects/BloomEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public override void OnInspectorGUI () {
8585
// display info text when screen blend mode cannot be used
8686
Camera cam = (target as Bloom).GetComponent<Camera>();
8787
if (cam != null) {
88-
if (screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) {
88+
if (screenBlendMode.enumValueIndex==0 && ((cam.allowHDR && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) {
8989
EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info);
9090
}
9191
}

Unity/SCANsat/Assets/Editor/ImageEffects/TonemappingEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public override void OnInspectorGUI () {
4242

4343
Camera cam = (target as Tonemapping).GetComponent<Camera>();
4444
if (cam != null) {
45-
if (!cam.hdr) {
45+
if (!cam.allowHDR) {
4646
EditorGUILayout.HelpBox("The camera is not HDR enabled. This will likely break the Tonemapper.", MessageType.Warning);
4747
}
4848
else if (!(target as Tonemapping).validRenderTextureFormat) {

Unity/SCANsat/Assets/Standard Assets.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Unity/SCANsat/Assets/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void OnRenderImage (RenderTexture source, RenderTexture destination)
105105

106106
doHdr = false;
107107
if (hdr == HDRBloomMode.Auto)
108-
doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent<Camera>().hdr;
108+
doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent<Camera>().allowHDR;
109109
else {
110110
doHdr = hdr == HDRBloomMode.On;
111111
}

Unity/SCANsat/Assets/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void OnRenderImage(RenderTexture source, RenderTexture destination)
108108

109109
doHdr = false;
110110
if (hdr == HDRBloomMode.Auto)
111-
doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent<Camera>().hdr;
111+
doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent<Camera>().allowHDR;
112112
else
113113
{
114114
doHdr = hdr == HDRBloomMode.On;

Unity/SCANsat/Assets/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ void OnRenderImage (RenderTexture source, RenderTexture destination) {
255255
dx11bokehMaterial.SetVector ("_Screen", new Vector3(1.0f/(1.0f*source.width), 1.0f/(1.0f*source.height), internalBlurWidth));
256256
dx11bokehMaterial.SetPass (2);
257257

258-
Graphics.DrawProceduralIndirect (MeshTopology.Points, cbDrawArgs, 0);
258+
Graphics.DrawProceduralIndirectNow (MeshTopology.Points, cbDrawArgs, 0);
259259

260260
Graphics.Blit (dest2, destination); // hackaround for DX11 high resolution flipfun (OPTIMIZEME)
261261

@@ -329,7 +329,7 @@ void OnRenderImage (RenderTexture source, RenderTexture destination) {
329329
dx11bokehMaterial.SetTexture ("_MainTex", dx11BokehTexture);
330330
dx11bokehMaterial.SetVector ("_Screen", new Vector3(1.0f/(1.0f*rtLow2.width), 1.0f/(1.0f*rtLow2.height), internalBlurWidth));
331331
dx11bokehMaterial.SetPass (1);
332-
Graphics.DrawProceduralIndirect (MeshTopology.Points, cbDrawArgs, 0);
332+
Graphics.DrawProceduralIndirectNow (MeshTopology.Points, cbDrawArgs, 0);
333333

334334
// upsample & combine
335335
dofHdrMaterial.SetTexture ("_LowRez", rtLow2);

Unity/SCANsat/Assets/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void OnRenderImage (RenderTexture source, RenderTexture destination) {
8989
sunShaftsMaterial.SetVector ("_SunThreshold", sunThreshold);
9090

9191
if (!useDepthTexture) {
92-
var format= GetComponent<Camera>().hdr ? RenderTextureFormat.DefaultHDR: RenderTextureFormat.Default;
92+
var format= GetComponent<Camera>().allowHDR ? RenderTextureFormat.DefaultHDR: RenderTextureFormat.Default;
9393
RenderTexture tmpBuffer = RenderTexture.GetTemporary (source.width, source.height, 0, format);
9494
RenderTexture.active = tmpBuffer;
9595
GL.ClearWithSkybox (false, GetComponent<Camera>());

0 commit comments

Comments
 (0)