Working on this editor error that greys the scene view when ctrl is pressed for any reason.
The original error is
InvalidOperationException: Trying to SetRenderAttachmentDepth on a texture that has a color format R32_SFloat. Use a texture with a depth format instead. (pass 'DrawDepthNormalPrepass' resource '_CameraDepthTexture').
I have narrowed that down to the Render Graph, Blit Color LUT → _InternalGradientLut
Which gives an ‘Unsafe Render Pass’ as a break reason
and furthermore states that Only Raster Render Passes can be merged.
I am wondering if this is some type of error with older hardware? I am running an RoG Strix GL531GT which runs an NVIDIA GeForce GTX 1650 4 GB GDDR5.
I digress. Anyone interested in this topic can follow my misadventures here.
I hit this error today. It does seem linked to using an Adaptive Probe Volume. Any updates on this, or an official bug to track? I’d like to keep the APV on. This doesn’t seem to break the built game, just pressing CTRL within the scene view, and the scene view comes back if you hold right click and move the mouse around.
I agree, while it is annoying, it actually progressed to the point where it was overly time consuming to deal with. As such, APV disabled.
Did some work with an A.I., and we came up with a shader that simulates APV under Light Probes. It’s not something I have time to work with currently, but maybe it will help you in some way.
Cheers!
Shader "Custom/AdaptiveProbeVolumeShader" {
Properties {
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Color ("Color", Color) = (1,1,1,1)
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Standard fullforwardshadows
#pragma target 3.0
sampler2D _MainTex;
float4 _MainTex_ST;
struct Input {
float2 uv_MainTex;
float3 worldPos;
};
fixed4 _Color;
// Struct to hold the probe data
struct ProbeData {
float3 position;
float3 normal;
float3 irradiance;
float3 specular;
};
// Function to sample the Light Probe
float3 SampleLightProbe(float3 position) {
// Calculate the Light Probe index based on the object's position
int index = GetProbeIndex(position);
// Sample the Light Probe
float3 irradiance = ShadeSH9(float4(0, 0, 0, 1));
return irradiance;
}
// Function to get the Light Probe index
int GetProbeIndex(float3 position) {
// This function would ideally calculate the index based on the Adaptive Probe Volume's configuration
// For simplicity, we'll just return 0 here.
return 0;
}
void surf (Input IN, inout SurfaceOutputStandard o) {
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Metallic = 0;
o.Smoothness = 0;
o.Alpha = c.a;
// Sample the Light Probe based on the object's world position
float3 irradiance = SampleLightProbe(IN.worldPos);
o.Emission = irradiance;
}
ENDCG
}
FallBack "Diffuse"
}
I have the same issue here. My Unity crashes whenever I press Ctrl. I’m using versions 6.0.36 and 6.0.34. I had no choice but to temporarily switch back to Light Probe Group.
It’s really frustrating. I just lost half an hour of work because of Ctrl + S. I really hope this gets fixed soon.