浏览代码

Merge pull request #721 from Unity-Technologies/feature/ReflectionProbeEditor

Reflection Probe Editor
/feature-ReflectionProbeFit
GitHub 7 年前
当前提交
33e6b13b
共有 2 个文件被更改,包括 11 次插入2 次删除
  1. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDReflectionProbeEditor.ProbeUtility.cs
  2. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDReflectionProbeEditor.ProbeUtility.cs


var a = (HDAdditionalReflectionData)m_AdditionalDataSerializedObject.targetObjects[i];
InitializeProbe(p, a);
}
// For an unknown reason, newly created probes sometype have the type "Quad" (value = 1)
// This type of probe is not supported by Unity since 5.4
// But we need to force it here so it does not bake into a 2D texture but a Cubemap
serializedObject.Update();
serializedObject.FindProperty("m_Type").intValue = 0;
serializedObject.ApplyModifiedProperties();
}

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl


// 2. Process the position influence
// Calculate falloff value, so reflections on the edges of the volume would gradually blend to previous reflection.
#if defined(ENVMAP_FEATURE_PERFACEINFLUENCE)
#if defined(ENVMAP_FEATURE_PERFACEINFLUENCE) || defined(ENVMAP_FEATURE_INFLUENCENORMAL) || defined(ENVMAP_FEATURE_PERFACEFADE)
#endif
#if defined(ENVMAP_FEATURE_PERFACEINFLUENCE)
// Influence falloff for each face
float3 negativeFalloff = negativeDistance / max(0.0001, lightData.blendDistanceNegative);
float3 positiveFalloff = positiveDistance / max(0.0001, lightData.blendDistancePositive);

正在加载...
取消
保存