DRW: Volume: Fix crash in command line render caused by null textures
This was caused by the world volume shader needing placeholder textures that were not available until cache populate begins. Adding a check and creating on the fly fixes the issue.
This commit is contained in:
@@ -89,6 +89,10 @@ void DRW_volume_free(void)
|
||||
|
||||
static GPUTexture *grid_default_texture(eGPUDefaultValue default_value)
|
||||
{
|
||||
if (g_data.dummy_one == nullptr) {
|
||||
drw_volume_globals_init();
|
||||
}
|
||||
|
||||
switch (default_value) {
|
||||
case GPU_DEFAULT_0:
|
||||
return g_data.dummy_zero;
|
||||
|
Reference in New Issue
Block a user