浏览代码

(wip) Reflection system for reflection probes

/feature-ReflectionProbeBaking
Frédéric Vauchelles 7 年前
当前提交
dcaf6281
共有 8 个文件被更改,包括 539 次插入5 次删除
  1. 163
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/EditorReflectionSystem.cs
  2. 19
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystem.cs
  3. 23
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemInternal.cs
  4. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemSceneDictionary.cs
  5. 206
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/PlanarReflectionProbeBaker.cs
  6. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/PlanarReflectionProbeBaker.cs.meta
  7. 109
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionProbeBaker.cs
  8. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionProbeBaker.cs.meta

163
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/EditorReflectionSystem.cs


using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
using UnityEngine.Experimental.Rendering.HDPipeline.Internal;
using UnityEngine.Rendering;

static int _Cubemap = Shader.PropertyToID("_Cubemap");
const HideFlags k_ReflectionSystemDictionaryHideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector | HideFlags.DontSaveInBuild;
static PlanarReflectionProbeBaker s_PlanarReflectionProbeBaker = new PlanarReflectionProbeBaker();
static ReflectionProbeBaker s_ReflectionProbeBaker = new ReflectionProbeBaker();
static List<ReflectionProbe> s_TmpReflectionProbeList = new List<ReflectionProbe>();
static List<PlanarReflectionProbe> s_TmpPlanarReflectionProbeList = new List<PlanarReflectionProbe>();
public static bool IsCollidingWithOtherProbes(string targetPath, ReflectionProbe targetProbe, out ReflectionProbe collidingProbe)
{

return true;
}
static string GetBakePath(PlanarReflectionProbe probe)
static string GetBakePath(Component probe)
var id = GetProbePersistentID(probe);
var id = GetComponentPersistentID(probe);
if (id == -1)
return string.Empty;

return targetPath;
}
static int GetProbePersistentID(PlanarReflectionProbe probe)
static int GetComponentPersistentID(Component probe)
{
var scene = probe.gameObject.scene;
if (!scene.IsValid())

static void LightmappingOnBakeReflectionProbeRequest(Hash128 dependencyHash)
{
Debug.Log("Bake: " + dependencyHash);
// Custom probe hashes should be handled here by the user
// var customProbeHash = CalculateCustomProbeHashes()
// dependencyHash = CombineHashes(dependencyHash, customProbeHash);
// Currently only one bounce is handled
// TODO: Use UnityEngine.RenderSettings.reflectionBounces and handle bounces
ReflectionSystem.QueryReflectionProbes(
s_TmpReflectionProbeList,
mode: ReflectionProbeMode.Baked);
var reflectionProbeTargets = new RenderTexture[s_TmpReflectionProbeList.Count];
for (var i = 0; i < reflectionProbeTargets.Length; ++i)
reflectionProbeTargets[i] = s_ReflectionProbeBaker.NewRenderTarget(
s_TmpReflectionProbeList[i],
ReflectionSystem.parameters.reflectionProbeSize
);
for (var i = 0; i < s_TmpReflectionProbeList.Count; ++i)
s_ReflectionProbeBaker.Render(s_TmpReflectionProbeList[i], reflectionProbeTargets[i]);
ReflectionSystem.QueryPlanarProbes(
s_TmpPlanarReflectionProbeList,
mode: ReflectionProbeMode.Baked);
var planarProbeTargets = new RenderTexture[s_TmpPlanarReflectionProbeList.Count];
for (var i = 0; i < planarProbeTargets.Length; ++i)
planarProbeTargets[i] = s_PlanarReflectionProbeBaker.NewRenderTarget(
s_TmpPlanarReflectionProbeList[i],
ReflectionSystem.parameters.planarReflectionProbeSize
);
for (var i = 0; i < s_TmpPlanarReflectionProbeList.Count; ++i)
s_PlanarReflectionProbeBaker.Render(s_TmpPlanarReflectionProbeList[i], planarProbeTargets[i]);
AssetDatabase.StartAssetEditing();
for (var i = 0; i < reflectionProbeTargets.Length; i++)
{
var probe = s_TmpReflectionProbeList[i];
var bakedTexture = probe.bakedTexture;
var target = reflectionProbeTargets[i];
var assetPath = string.Empty;
if (bakedTexture != null)
assetPath = AssetDatabase.GetAssetPath(bakedTexture);
if (string.IsNullOrEmpty(assetPath))
assetPath = GetBakePath(probe);
var createAsset = false;
if (bakedTexture == null || string.IsNullOrEmpty(assetPath))
{
bakedTexture = new Cubemap(target.width, GraphicsFormat.R16G16B16A16_SFloat, TextureCreationFlags.None);
probe.bakedTexture = bakedTexture;
createAsset = true;
EditorUtility.SetDirty(probe);
}
for (var j = 0 ; j < 6; ++j)
Graphics.CopyTexture(target, i, bakedTexture, i);
if (createAsset)
AssetDatabase.CreateAsset(bakedTexture, assetPath);
else
EditorUtility.SetDirty(bakedTexture);
}
for (var i = 0; i < planarProbeTargets.Length; i++)
{
var probe = s_TmpPlanarReflectionProbeList[i];
var bakedTexture = probe.bakedTexture;
var target = planarProbeTargets[i];
var assetPath = string.Empty;
if (bakedTexture != null)
assetPath = AssetDatabase.GetAssetPath(bakedTexture);
if (string.IsNullOrEmpty(assetPath))
assetPath = GetBakePath(probe);
var createAsset = false;
if (bakedTexture == null || string.IsNullOrEmpty(assetPath))
{
bakedTexture = new Texture2D(target.width, target.height, GraphicsFormat.R16G16B16A16_SFloat, TextureCreationFlags.None);
probe.bakedTexture = bakedTexture;
createAsset = true;
EditorUtility.SetDirty(probe);
}
Graphics.CopyTexture(target, 0, bakedTexture, 0);
if (createAsset)
AssetDatabase.CreateAsset(bakedTexture, assetPath);
else
EditorUtility.SetDirty(bakedTexture);
}
AssetDatabase.StopAssetEditing();
AssetDatabase.SaveAssets();
AssetDatabase.StartAssetEditing();
for (var i = 0; i < reflectionProbeTargets.Length; i++)
{
var probe = s_TmpReflectionProbeList[i];
var bakedTexture = probe.bakedTexture;
var path = AssetDatabase.GetAssetPath(bakedTexture);
var importer = AssetImporter.GetAtPath(path) as TextureImporter;
if (importer != null)
{
importer.alphaSource = TextureImporterAlphaSource.None;
importer.sRGBTexture = false;
importer.mipmapEnabled = false;
var hdrp = GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset;
if (hdrp != null)
{
importer.textureCompression = hdrp.renderPipelineSettings.lightLoopSettings.reflectionCacheCompressed
? TextureImporterCompression.Compressed
: TextureImporterCompression.Uncompressed;
}
importer.SaveAndReimport();
}
}
for (var i = 0; i < planarProbeTargets.Length; i++)
{
var probe = s_TmpPlanarReflectionProbeList[i];
var bakedTexture = probe.bakedTexture;
var path = AssetDatabase.GetAssetPath(bakedTexture);
var importer = AssetImporter.GetAtPath(path) as TextureImporter;
if (importer != null)
{
importer.alphaSource = TextureImporterAlphaSource.None;
importer.sRGBTexture = false;
importer.mipmapEnabled = false;
var hdrp = GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset;
if (hdrp != null)
{
importer.textureCompression = hdrp.renderPipelineSettings.lightLoopSettings.planarReflectionCacheCompressed
? TextureImporterCompression.Compressed
: TextureImporterCompression.Uncompressed;
}
importer.SaveAndReimport();
}
}
AssetDatabase.StopAssetEditing();
}
static void LightmappingOnBakeReflectionProbeRequestCancelled(Hash128 dependencyHash)

19
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystem.cs


using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Rendering;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{

{
get { return s_Instance.parameters; }
set { s_Instance = new ReflectionSystemInternal(value, s_Instance); }
}
public static void QueryReflectionProbes(
List<ReflectionProbe> results,
bool enabled = true,
ReflectionProbeMode mode = ReflectionProbeMode.Realtime)
{
s_Instance.QueryReflectionProbes(results, enabled, mode);
}
public static void QueryPlanarProbes(
List<PlanarReflectionProbe> results,
bool enabled = true,
ReflectionProbeMode mode = ReflectionProbeMode.Realtime)
{
s_Instance.QueryPlanarProbes(results, enabled, mode);
}
public static void SetParameters(ReflectionSystemParameters parameters)

23
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemInternal.cs


using System.Collections.Generic;
using System.Linq;
using UnityEngine.Rendering;
namespace UnityEngine.Experimental.Rendering.HDPipeline.Internal

m_ReflectionProbesArray);
}
#endregion
public void QueryReflectionProbes(
List<ReflectionProbe> results,
bool enabled,
ReflectionProbeMode mode)
{
results.Clear();
results.AddRange(m_ReflectionProbes.Where(
p => p.enabled == enabled
&& p.mode == mode));
}
public void QueryPlanarProbes(
List<PlanarReflectionProbe> results,
bool enabled,
ReflectionProbeMode mode)
{
results.Clear();
results.AddRange(m_PlanarReflectionProbes.Where(
p => p.enabled == enabled
&& p.mode == mode));
}
}
}

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemSceneDictionary.cs


Dictionary<Object, int> m_ObjectIndex = new Dictionary<Object, int>();
Dictionary<int, Object> m_IDIndex = new Dictionary<int, Object>();
public int GetIdFor(PlanarReflectionProbe probe)
public int GetIdFor(Object probe)
{
if (m_ObjectIndex.ContainsKey(probe))
return m_ObjectIndex[probe];

206
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/PlanarReflectionProbeBaker.cs


using UnityEngine.Rendering;
namespace UnityEngine.Experimental.Rendering.HDPipeline.Internal
{
public class PlanarReflectionProbeBaker
{
Camera m_RenderCamera = null;
HDAdditionalCameraData m_RenderCameraData;
public void Render(PlanarReflectionProbe probe, RenderTexture target, Camera viewerCamera = null)
{
var renderCamera = GetRenderHDCamera(probe);
renderCamera.camera.targetTexture = target;
SetupCameraForRender(renderCamera.camera, probe, viewerCamera);
GL.invertCulling = IsProbeCaptureMirrored(probe, viewerCamera);
renderCamera.camera.Render();
GL.invertCulling = false;
renderCamera.camera.targetTexture = null;
target.IncrementUpdateCount();
}
public void Render(PlanarReflectionProbe[] probes, Camera viewerCamera, int length)
{
for (var i = 0; i < length; i++)
{
var probe = probes[i];
Render(probe, probe.realtimeTexture, viewerCamera);
}
}
public HDCamera GetRenderHDCamera(PlanarReflectionProbe probe)
{
var camera = GetRenderCamera();
probe.frameSettings.CopyTo(m_RenderCameraData.GetFrameSettings());
return HDCamera.Get(camera, null, probe.frameSettings);
}
public static void CalculateCaptureCameraProperties(PlanarReflectionProbe probe, out float nearClipPlane, out float farClipPlane, out float aspect, out float fov, out CameraClearFlags clearFlags, out Color backgroundColor, out Matrix4x4 worldToCamera, out Matrix4x4 projection, out Vector3 capturePosition, out Quaternion captureRotation, Camera viewerCamera = null)
{
if (viewerCamera != null
&& probe.mode == ReflectionProbeMode.Realtime
&& probe.refreshMode == ReflectionProbeRefreshMode.EveryFrame
&& probe.capturePositionMode == PlanarReflectionProbe.CapturePositionMode.MirrorCamera)
CalculateMirroredCaptureCameraProperties(probe, viewerCamera, out nearClipPlane, out farClipPlane, out aspect, out fov, out clearFlags, out backgroundColor, out worldToCamera, out projection, out capturePosition, out captureRotation);
else
CalculateStaticCaptureCameraProperties(probe, out nearClipPlane, out farClipPlane, out aspect, out fov, out clearFlags, out backgroundColor, out worldToCamera, out projection, out capturePosition, out captureRotation);
}
public static void CalculateCaptureCameraViewProj(PlanarReflectionProbe probe, out Matrix4x4 worldToCamera, out Matrix4x4 projection, out Vector3 capturePosition, out Quaternion captureRotation, Camera viewerCamera = null)
{
float nearClipPlane, farClipPlane, aspect, fov;
CameraClearFlags clearFlags;
Color backgroundColor;
CalculateCaptureCameraProperties(
probe,
out nearClipPlane, out farClipPlane,
out aspect, out fov, out clearFlags, out backgroundColor,
out worldToCamera, out projection, out capturePosition, out captureRotation,
viewerCamera);
}
static bool IsProbeCaptureMirrored(PlanarReflectionProbe probe, Camera viewerCamera)
{
return viewerCamera != null
&& probe.mode == ReflectionProbeMode.Realtime
&& probe.refreshMode == ReflectionProbeRefreshMode.EveryFrame
&& probe.capturePositionMode == PlanarReflectionProbe.CapturePositionMode.MirrorCamera;
}
static void CalculateStaticCaptureCameraProperties(PlanarReflectionProbe probe, out float nearClipPlane, out float farClipPlane, out float aspect, out float fov, out CameraClearFlags clearFlags, out Color backgroundColor, out Matrix4x4 worldToCamera, out Matrix4x4 projection, out Vector3 capturePosition, out Quaternion captureRotation)
{
nearClipPlane = probe.captureNearPlane;
farClipPlane = probe.captureFarPlane;
aspect = 1f;
fov = probe.overrideFieldOfView
? probe.fieldOfViewOverride
: 90f;
clearFlags = CameraClearFlags.Nothing;
backgroundColor = Color.white;
capturePosition = probe.transform.TransformPoint(probe.captureLocalPosition);
captureRotation = Quaternion.LookRotation((Vector3)probe.influenceToWorld.GetColumn(3) - capturePosition, probe.transform.up);
worldToCamera = GeometryUtils.CalculateWorldToCameraMatrixRHS(capturePosition, captureRotation);
var clipPlane = GeometryUtils.CameraSpacePlane(worldToCamera, probe.captureMirrorPlanePosition, probe.captureMirrorPlaneNormal);
projection = Matrix4x4.Perspective(fov, aspect, nearClipPlane, farClipPlane);
projection = GeometryUtils.CalculateObliqueMatrix(projection, clipPlane);
}
static void CalculateMirroredCaptureCameraProperties(PlanarReflectionProbe probe, Camera viewerCamera, out float nearClipPlane, out float farClipPlane, out float aspect, out float fov, out CameraClearFlags clearFlags, out Color backgroundColor, out Matrix4x4 worldToCamera, out Matrix4x4 projection, out Vector3 capturePosition, out Quaternion captureRotation)
{
nearClipPlane = viewerCamera.nearClipPlane;
farClipPlane = viewerCamera.farClipPlane;
aspect = 1;
fov = probe.overrideFieldOfView
? probe.fieldOfViewOverride
: Mathf.Max(viewerCamera.fieldOfView, viewerCamera.fieldOfView * viewerCamera.aspect);
clearFlags = viewerCamera.clearFlags;
backgroundColor = viewerCamera.backgroundColor;
var worldToCapture = GeometryUtils.CalculateWorldToCameraMatrixRHS(viewerCamera.transform);
var reflectionMatrix = GeometryUtils.CalculateReflectionMatrix(probe.captureMirrorPlanePosition, probe.captureMirrorPlaneNormal);
worldToCamera = worldToCapture * reflectionMatrix;
var clipPlane = GeometryUtils.CameraSpacePlane(worldToCamera, probe.captureMirrorPlanePosition, probe.captureMirrorPlaneNormal);
var sourceProj = Matrix4x4.Perspective(fov, aspect, nearClipPlane, farClipPlane);
projection = GeometryUtils.CalculateObliqueMatrix(sourceProj, clipPlane);
capturePosition = reflectionMatrix.MultiplyPoint(viewerCamera.transform.position);
var forward = reflectionMatrix.MultiplyVector(viewerCamera.transform.forward);
var up = reflectionMatrix.MultiplyVector(viewerCamera.transform.up);
captureRotation = Quaternion.LookRotation(forward, up);
}
Camera GetRenderCamera()
{
if (m_RenderCamera == null)
{
var go = GameObject.Find("__Probe Render Camera") ?? new GameObject("__Probe Render Camera");
go.hideFlags = HideFlags.HideAndDontSave;
m_RenderCamera = go.GetComponent<Camera>();
if (m_RenderCamera == null || m_RenderCamera.Equals(null))
m_RenderCamera = go.AddComponent<Camera>();
// We need to setup cameraType before adding additional camera
m_RenderCamera.cameraType = CameraType.Reflection;
m_RenderCameraData = go.GetComponent<HDAdditionalCameraData>();
if (m_RenderCameraData == null || m_RenderCameraData.Equals(null))
m_RenderCameraData = go.AddComponent<HDAdditionalCameraData>();
go.SetActive(false);
}
return m_RenderCamera;
}
static void SetupCameraForRender(Camera camera, PlanarReflectionProbe probe, Camera viewerCamera = null)
{
float nearClipPlane, farClipPlane, aspect, fov;
Color backgroundColor;
CameraClearFlags clearFlags;
Vector3 capturePosition;
Quaternion captureRotation;
Matrix4x4 worldToCamera, projection;
CalculateCaptureCameraProperties(probe,
out nearClipPlane, out farClipPlane,
out aspect, out fov, out clearFlags, out backgroundColor,
out worldToCamera, out projection,
out capturePosition, out captureRotation, viewerCamera);
camera.farClipPlane = farClipPlane;
camera.nearClipPlane = nearClipPlane;
camera.fieldOfView = fov;
camera.aspect = aspect;
camera.clearFlags = clearFlags;
camera.backgroundColor = camera.backgroundColor;
camera.projectionMatrix = projection;
camera.worldToCameraMatrix = worldToCamera;
var ctr = camera.transform;
ctr.position = capturePosition;
ctr.rotation = captureRotation;
}
public void AllocateRealtimeTextureIfRequired(PlanarReflectionProbe[] probes, int probeResolution, int length)
{
for (var i = 0; i < length; i++)
{
var probe = probes[i];
if (!IsPlanarProbeRealtimeTextureValid(probe.realtimeTexture, probeResolution))
{
if (probe.realtimeTexture != null)
probe.realtimeTexture.Release();
probe.realtimeTexture = NewRenderTarget(probe, probeResolution);
}
}
}
public RenderTexture NewRenderTarget(PlanarReflectionProbe probe, int probeResolution)
{
var rt = new RenderTexture(probeResolution, probeResolution, 0, RenderTextureFormat.ARGBHalf);
// No hide and don't save for this one
rt.useMipMap = true;
rt.autoGenerateMips = false;
rt.name = CoreUtils.GetRenderTargetAutoName(probeResolution, probeResolution, RenderTextureFormat.ARGBHalf, "PlanarProbeRT");
rt.Create();
return rt;
}
static bool IsPlanarProbeRealtimeTextureValid(RenderTexture renderTexture, int probeResolution)
{
return renderTexture != null
&& renderTexture.width == probeResolution
&& renderTexture.height == probeResolution
&& renderTexture.format == RenderTextureFormat.ARGBHalf
&& renderTexture.useMipMap;
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/PlanarReflectionProbeBaker.cs.meta


fileFormatVersion: 2
guid: 101c9d080faf28e42bb051f0a6df69f1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

109
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionProbeBaker.cs


using UnityEngine.Rendering;
namespace UnityEngine.Experimental.Rendering.HDPipeline.Internal
{
public class ReflectionProbeBaker
{
Camera m_RenderCamera = null;
HDAdditionalCameraData m_RenderCameraData;
public void Render(ReflectionProbe probe, RenderTexture target)
{
var renderCamera = GetRenderHDCamera(probe);
renderCamera.camera.targetTexture = target;
SetupCameraForRender(renderCamera.camera, probe);
renderCamera.camera.RenderToCubemap(probe.realtimeTexture, -1);
renderCamera.camera.targetTexture = null;
target.IncrementUpdateCount();
}
public void Render(ReflectionProbe[] probes, int length)
{
for (var i = 0; i < length; i++)
{
var probe = probes[i];
Render(probe, probe.realtimeTexture);
}
}
public HDCamera GetRenderHDCamera(ReflectionProbe probe)
{
var camera = GetRenderCamera();
var hdCameData = ComponentSingleton<HDAdditionalCameraData>.instance;
var frameSettings = hdCameData.GetFrameSettings();
frameSettings.CopyTo(m_RenderCameraData.GetFrameSettings());
return HDCamera.Get(camera, null, frameSettings);
}
Camera GetRenderCamera()
{
if (m_RenderCamera == null)
{
var go = GameObject.Find("__Reflection Probe Render Camera") ?? new GameObject("__Reflection Probe Render Camera");
go.hideFlags = HideFlags.HideAndDontSave;
m_RenderCamera = go.GetComponent<Camera>();
if (m_RenderCamera == null || m_RenderCamera.Equals(null))
m_RenderCamera = go.AddComponent<Camera>();
// We need to setup cameraType before adding additional camera
m_RenderCamera.cameraType = CameraType.Reflection;
m_RenderCameraData = go.GetComponent<HDAdditionalCameraData>();
if (m_RenderCameraData == null || m_RenderCameraData.Equals(null))
m_RenderCameraData = go.AddComponent<HDAdditionalCameraData>();
go.SetActive(false);
}
return m_RenderCamera;
}
static void SetupCameraForRender(Camera camera, ReflectionProbe probe)
{
var ptr = probe.transform;
var ctr = camera.transform;
ctr.position = ptr.position;
ctr.rotation = ptr.rotation;
}
public void AllocateRealtimeTextureIfRequired(ReflectionProbe[] probes, int probeResolution, int length)
{
for (var i = 0; i < length; i++)
{
var probe = probes[i];
if (!IsProbeRealtimeTextureValid(probe.realtimeTexture, probeResolution))
{
if (probe.realtimeTexture != null)
probe.realtimeTexture.Release();
probe.realtimeTexture = NewRenderTarget(probe, probeResolution);
}
}
}
public RenderTexture NewRenderTarget(ReflectionProbe probe, int probeResolution)
{
var rt = new RenderTexture(probeResolution, probeResolution, 0, RenderTextureFormat.ARGBHalf);
// No hide and don't save for this one
rt.useMipMap = true;
rt.autoGenerateMips = false;
rt.dimension = TextureDimension.Cube;
rt.name = CoreUtils.GetRenderTargetAutoName(probeResolution, probeResolution, RenderTextureFormat.ARGBHalf, "PlanarProbeRT");
rt.Create();
return rt;
}
static bool IsProbeRealtimeTextureValid(RenderTexture renderTexture, int probeResolution)
{
return renderTexture != null
&& renderTexture.width == probeResolution
&& renderTexture.height == probeResolution
&& renderTexture.format == RenderTextureFormat.ARGBHalf
&& renderTexture.dimension == TextureDimension.Cube
&& renderTexture.useMipMap;
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionProbeBaker.cs.meta


fileFormatVersion: 2
guid: 74f85c45f57cfff48b28735837e945e9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存