Eevee: Fix T53095: Black cube on start and no material updates
This was caused by a not bound unused texture. Removing the texture usage fixes the problem.
This commit is contained in:
parent
0e7113df21
commit
8dab90915f
Notes:
blender-bot
2023-09-08 04:55:43 +02:00
Referenced by issue #53095, Black cube on start and no material updates
|
@ -218,6 +218,7 @@ static struct GPUShader *eevee_effects_ssr_shader_get(int options)
|
|||
}
|
||||
else {
|
||||
BLI_dynstr_appendf(ds_defines, "#define STEP_RAYTRACE\n");
|
||||
BLI_dynstr_appendf(ds_defines, "#define PLANAR_PROBE_RAYTRACE\n");
|
||||
}
|
||||
if (options & SSR_FULL_TRACE) {
|
||||
BLI_dynstr_appendf(ds_defines, "#define FULLRES\n");
|
||||
|
|
|
@ -10,19 +10,24 @@ uniform float borderFadeFactor;
|
|||
|
||||
float sample_depth(vec2 uv, int index, float lod)
|
||||
{
|
||||
#ifdef PLANAR_PROBE_RAYTRACE
|
||||
if (index > -1) {
|
||||
return textureLod(planarDepth, vec3(uv, index), 0.0).r;
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
/* Correct UVs for mipmaping mis-alignment */
|
||||
uv *= mipRatio[int(lod + 1.0)];
|
||||
return textureLod(maxzBuffer, uv, lod).r;
|
||||
#ifdef PLANAR_PROBE_RAYTRACE
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
vec4 sample_depth_grouped(vec4 uv1, vec4 uv2, int index, float lod)
|
||||
{
|
||||
vec4 depths;
|
||||
#ifdef PLANAR_PROBE_RAYTRACE
|
||||
if (index > -1) {
|
||||
depths.x = textureLod(planarDepth, vec3(uv1.xy, index), 0.0).r;
|
||||
depths.y = textureLod(planarDepth, vec3(uv1.zw, index), 0.0).r;
|
||||
|
@ -30,11 +35,14 @@ vec4 sample_depth_grouped(vec4 uv1, vec4 uv2, int index, float lod)
|
|||
depths.w = textureLod(planarDepth, vec3(uv2.zw, index), 0.0).r;
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
depths.x = textureLod(maxzBuffer, uv1.xy, lod).r;
|
||||
depths.y = textureLod(maxzBuffer, uv1.zw, lod).r;
|
||||
depths.z = textureLod(maxzBuffer, uv2.xy, lod).r;
|
||||
depths.w = textureLod(maxzBuffer, uv2.zw, lod).r;
|
||||
#ifdef PLANAR_PROBE_RAYTRACE
|
||||
}
|
||||
#endif
|
||||
return depths;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue