Merge remote-tracking branch 'refs/remotes/origin/master' into culling
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Nz
|
||||
{
|
||||
ErrorFlags flags(ErrorFlag_ThrowException, true);
|
||||
|
||||
std::array<UInt8, 4> whitePixel = {255, 255, 255, 255};
|
||||
std::array<UInt8, 4> whitePixel = { {255, 255, 255, 255} };
|
||||
m_whiteTexture.Create(ImageType_2D, PixelFormatType_RGBA8, 1, 1);
|
||||
m_whiteTexture.Update(whitePixel.data());
|
||||
|
||||
@@ -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);
|
||||
@@ -508,7 +508,6 @@ namespace Nz
|
||||
|
||||
for (auto& matIt : pipelinePair.second.materialMap)
|
||||
{
|
||||
const Material* material = matIt.first;
|
||||
auto& entry = matIt.second;
|
||||
auto& billboardVector = entry.billboards;
|
||||
|
||||
@@ -591,7 +590,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();
|
||||
|
||||
Reference in New Issue
Block a user