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"); }
static void UpdateEnvironmentSubScenes(SerializedHDRaytracingEnvironment rtEnv) { rtEnv.Apply(); HDRenderPipeline hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline; if (hdPipeline != null) { hdPipeline.m_RayTracingManager.UpdateEnvironmentSubScenes(); } }
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); } }
static void GenericSubMenu(SerializedHDRaytracingEnvironment rtEnv, Editor owner) { // AO Specific fields EditorGUILayout.PropertyField(rtEnv.rayBias, Styles.rayBiasText); }