Optimization and tweaks

This commit is contained in:
Wojtek Figat
2021-04-29 23:20:37 +02:00
parent e2789214ae
commit 05f919c50f
36 changed files with 100 additions and 133 deletions

View File

@@ -39,7 +39,12 @@ bool GPUParticles::Init(ParticleEmitter* owner, MemoryReadStream& shaderCacheStr
// Load shader
ASSERT(GPUDevice::Instance);
_shader = GPUDevice::Instance->CreateShader(owner->GetPath());
#if GPU_ENABLE_RESOURCE_NAMING
const StringView name(owner->GetPath());
#else
const StringView name;
#endif
_shader = GPUDevice::Instance->CreateShader(name);
if (_shader->Create(shaderCacheStream))
{
LOG(Warning, "Failed to load shader.");