internal bool CanCaptureHDRFrames() { bool isGameViewInput = imageInputSettings.InputType == typeof(GameViewInput); bool isFormatExr = OutputFormat == ImageRecorderOutputFormat.EXR; return(!isGameViewInput && isFormatExr && CameraInputSettings.UsingHDRP()); }
protected override void FileTypeAndFormatGUI() { EditorGUILayout.PropertyField(m_OutputFormat, Styles.FormatLabel); var imageSettings = (ImageRecorderSettings)target; if (!CameraInputSettings.UsingHDRP()) { using (new EditorGUI.DisabledScope(!imageSettings.CanCaptureAlpha())) { EditorGUILayout.PropertyField(m_CaptureAlpha, Styles.CaptureAlphaLabel); } } string[] list_of_colorspaces = new[] { "sRGB, sRGB", "Linear, sRGB (unclamped)" }; if (imageSettings.CanCaptureHDRFrames()) { m_ColorSpace.intValue = EditorGUILayout.Popup(Styles.ColorSpace, m_ColorSpace.intValue, list_of_colorspaces); } else { using (new EditorGUI.DisabledScope(!imageSettings.CanCaptureHDRFrames())) { EditorGUILayout.Popup(Styles.ColorSpace, 0, list_of_colorspaces); } } }
internal bool CanCaptureAlpha() { bool formatSupportAlpha = OutputFormat == ImageRecorderOutputFormat.PNG || OutputFormat == ImageRecorderOutputFormat.EXR; bool inputSupportAlpha = imageInputSettings.SupportsTransparent; return(formatSupportAlpha && inputSupportAlpha && !CameraInputSettings.UsingHDRP()); }
public override void OnBehaviourPlay(Playable playable, FrameData info) { if (session == null) { return; } // Assumption: OnPlayStateChanged( PlayState.Playing ) ONLY EVER CALLED ONCE for this type of playable. m_PlayState = PlayState.Playing; // case FTV-251 the Options.useCameraCaptureCallbacks is enabled // too late for the RecorderClip when recording from the timeline // to workaround this problem also enable the // CaptureCallbackInputStrategy if HDRP is available Options.useCameraCaptureCallbacks = CameraInputSettings.UsingHDRP(); session.BeginRecording(); }
protected override void FileTypeAndFormatGUI() { EditorGUILayout.PropertyField(m_OutputFormat, Styles.FormatLabel); var imageSettings = (ImageRecorderSettings)target; if (!CameraInputSettings.UsingHDRP()) { using (new EditorGUI.DisabledScope(!imageSettings.CanCaptureAlpha())) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(m_CaptureAlpha, Styles.CaptureAlphaLabel); --EditorGUI.indentLevel; } } using (new EditorGUI.DisabledScope(!imageSettings.CanCaptureHDRFrames())) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(m_CaptureHDR, Styles.CaptureHDRLabel); --EditorGUI.indentLevel; } }