Graphics: Fix EnableInstancing(bool) having no impact
This commit is contained in:
parent
5a07bbd001
commit
7e594a861f
|
|
@ -82,7 +82,7 @@ namespace Nz
|
|||
|
||||
if (pipelineEntry.maxInstanceCount > 0)
|
||||
{
|
||||
bool instancing = (pipelineEntry.maxInstanceCount > NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT);
|
||||
bool instancing = instancingEnabled && (pipelineEntry.maxInstanceCount > NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT);
|
||||
|
||||
UInt32 flags = ShaderFlags_Deferred;
|
||||
if (instancing)
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ namespace Nz
|
|||
const Shader* lastShader = nullptr;
|
||||
const ShaderUniforms* shaderUniforms = nullptr;
|
||||
|
||||
if (Renderer::HasCapability(RendererCap_Instancing))
|
||||
if (m_instancingEnabled && Renderer::HasCapability(RendererCap_Instancing))
|
||||
{
|
||||
VertexBuffer* instanceBuffer = Renderer::GetInstanceBuffer();
|
||||
instanceBuffer->SetVertexDeclaration(&s_billboardInstanceDeclaration);
|
||||
|
|
@ -592,7 +592,7 @@ namespace Nz
|
|||
|
||||
if (pipelineEntry.maxInstanceCount > 0)
|
||||
{
|
||||
bool instancing = (pipelineEntry.maxInstanceCount > NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT);
|
||||
bool instancing = m_instancingEnabled && (pipelineEntry.maxInstanceCount > NAZARA_GRAPHICS_INSTANCING_MIN_INSTANCES_COUNT);
|
||||
const MaterialPipeline::Instance& pipelineInstance = pipeline->Apply((instancing) ? ShaderFlags_Instancing : 0);
|
||||
|
||||
const Shader* shader = pipelineInstance.uberInstance->GetShader();
|
||||
|
|
|
|||
Loading…
Reference in New Issue