Allow shader to define the depth compare operator
This commit is contained in:
@@ -40,6 +40,18 @@ namespace OpenVulkano::Scene
|
||||
PATCH_LIST
|
||||
};
|
||||
|
||||
enum class CompareOp : uint32_t
|
||||
{
|
||||
NEVER = 0,
|
||||
LESS = 1,
|
||||
EQUAL = 2,
|
||||
LESS_OR_EQUAL = 3,
|
||||
GREATER = 4,
|
||||
NOT_EQUAL = 5,
|
||||
GREATER_OR_EQUAL = 6,
|
||||
ALWAYS = 7
|
||||
};
|
||||
|
||||
struct ShaderProgram
|
||||
{
|
||||
ShaderProgramType type;
|
||||
@@ -77,6 +89,7 @@ namespace OpenVulkano::Scene
|
||||
Topology topology = Topology::TRIANGLE_LIST;
|
||||
CullMode cullMode = CullMode::BACK;
|
||||
ICloseable* renderShader = nullptr;
|
||||
CompareOp depthCompareOp = CompareOp::LESS;
|
||||
bool alphaBlend = false; // TODO allow fine control over blending
|
||||
bool depthTest = true;
|
||||
bool depthWrite = true;
|
||||
|
||||
Reference in New Issue
Block a user