Commit current work
Reworked conditions, added uber-shaders, comparison nodes, fixed Discard
This commit is contained in:
@@ -3,13 +3,17 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/SpirvWriter.hpp>
|
||||
#include <Nazara/Math/Algorithm.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
inline bool SpirvWriter::IsConditionEnabled(const std::string& condition) const
|
||||
{
|
||||
return m_context.states->enabledConditions.find(condition) != m_context.states->enabledConditions.end();
|
||||
std::size_t conditionIndex = m_context.shader->FindConditionByName(condition);
|
||||
assert(conditionIndex != ShaderAst::InvalidCondition);
|
||||
|
||||
return TestBit<Nz::UInt64>(m_context.states->enabledConditions, conditionIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user