Unity 2023.2.16f1 Bug Report
Trying to draw a Detail Mesh on the Terrain causes a bug:
ArgumentException: RenderTextureDesc graphicsFormat must be a supported GraphicsFormat. R8G8_SRGB is not supported on this platform.
Parameter name: desc.graphicsFormat
UnityEngine.RenderTexture.ValidateRenderTextureDesc (UnityEngine.RenderTextureDescriptor& desc) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEngine.RenderTexture.GetTemporary (UnityEngine.RenderTextureDescriptor desc) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEngine.RenderTexture.GetTemporaryImpl (System.Int32 width, System.Int32 height, UnityEngine.Experimental.Rendering.GraphicsFormat depthStencilFormat, UnityEngine.Experimental.Rendering.GraphicsFormat colorFormat, System.Int32 antiAliasing, UnityEngine.RenderTextureMemoryless memorylessMode, UnityEngine.VRTextureUsage vrUsage, System.Boolean useDynamicScale, UnityEngine.Rendering.ShadowSamplingMode shadowSamplingMode) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEngine.RenderTexture.GetTemporary (System.Int32 width, System.Int32 height, System.Int32 depthBuffer, UnityEngine.Experimental.Rendering.GraphicsFormat format, System.Int32 antiAliasing, UnityEngine.RenderTextureMemoryless memorylessMode, UnityEngine.VRTextureUsage vrUsage, System.Boolean useDynamicScale) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEngine.RenderTexture.GetTemporary (System.Int32 width, System.Int32 height, System.Int32 depthBuffer, UnityEngine.Experimental.Rendering.GraphicsFormat format, System.Int32 antiAliasing, UnityEngine.RenderTextureMemoryless memorylessMode, UnityEngine.VRTextureUsage vrUsage) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEngine.RenderTexture.GetTemporary (System.Int32 width, System.Int32 height, System.Int32 depthBuffer, UnityEngine.Experimental.Rendering.GraphicsFormat format, System.Int32 antiAliasing, UnityEngine.RenderTextureMemoryless memorylessMode) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEngine.RenderTexture.GetTemporary (System.Int32 width, System.Int32 height, System.Int32 depthBuffer, UnityEngine.Experimental.Rendering.GraphicsFormat format, System.Int32 antiAliasing) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEngine.RenderTexture.GetTemporary (System.Int32 width, System.Int32 height, System.Int32 depthBuffer, UnityEngine.Experimental.Rendering.GraphicsFormat format) (at <386c10ac68fc4fc89720e76e5a26273c>:0)
UnityEditor.TerrainTools.DetailScatterToolOvl.ApplyBrushInternal (UnityEngine.Texture2D brushTex, UnityEditor.TerrainTools.IBrushRenderUnderCursor brushRender) (at ./Library/PackageCache/com.unity.terrain-tools@5.1.0/Editor/TerrainTools/DetailsScatterToolOvl.cs:387)
UnityEditor.TerrainTools.DetailScatterToolOvl.OnPaint (UnityEngine.Terrain terrain, UnityEditor.TerrainTools.IOnPaint editContext) (at ./Library/PackageCache/com.unity.terrain-tools@5.1.0/Editor/TerrainTools/DetailsScatterToolOvl.cs:311)
UnityEditor.TerrainInspector.OnSceneGUICallback (UnityEditor.SceneView sceneView) (at <227deec66517476981760590f74c4cdd>:0)
UnityEditor.SceneView.CallOnSceneGUI () (at <1f7309508ffe410aad4144801d0db5ae>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <1f7309508ffe410aad4144801d0db5ae>:0)
UnityEditor.SceneView.DoOnGUI () (at <1f7309508ffe410aad4144801d0db5ae>:0)
UnityEditor.SceneView.OnSceneGUI () (at <1f7309508ffe410aad4144801d0db5ae>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleEventBubbleUp (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventBubbleUpInternal (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_BubbleUpHandleEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement element, System.Boolean disabled) (at :0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_BubbleUpAllDefaultActions (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement element, System.Boolean disabled, System.Boolean isCapturingTarget) (at :0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPathWithCompatibilityEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.EventBase compatibilityEvt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at :0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at :0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElement (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at :0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at :0)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at :0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at :0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at :0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at :0)
The Detail Mesh is not drawn, errors appear and the inspector window stops functioning normally (it does not show anything until you press Ctrl+S, but it shows info only once on the object, then if you select something else, the Inspector disappears again)
Bug screenshot:
This bug is very annoying. How can I fix it?
