Beispiel #1
0
        protected void OnEnable()
        {
            HDRaytracingEnvironment rtEnv = (HDRaytracingEnvironment)target;

            // Get & automatically add additional HD data if not present
            m_SerializedHDRaytracingEnvironment = new SerializedHDRaytracingEnvironment(rtEnv);

            k_ExpandedState = new ExpandedState <Expandable, HDRaytracingEnvironment>(~(-1), "HDRP");
        }
Beispiel #2
0
        static void UpdateEnvironmentSubScenes(SerializedHDRaytracingEnvironment rtEnv)
        {
            rtEnv.Apply();
            HDRenderPipeline hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;

            if (hdPipeline != null)
            {
                hdPipeline.m_RayTracingManager.UpdateEnvironmentSubScenes();
            }
        }
Beispiel #3
0
 static void IndirectDiffuseSubMenu(SerializedHDRaytracingEnvironment rtEnv, Editor owner)
 {
     // For the layer masks, we want to make sure the matching resources will be available during the following draw call. So we need to force a propagation to
     // the non serialized object and update the sub-scenes
     EditorGUI.BeginChangeCheck();
     EditorGUILayout.PropertyField(rtEnv.indirectDiffuseLayerMask, Styles.indirectDiffuseLayerMaskText);
     if (EditorGUI.EndChangeCheck())
     {
         UpdateEnvironmentSubScenes(rtEnv);
     }
 }
Beispiel #4
0
 static void GenericSubMenu(SerializedHDRaytracingEnvironment rtEnv, Editor owner)
 {
     // AO Specific fields
     EditorGUILayout.PropertyField(rtEnv.rayBias, Styles.rayBiasText);
 }