8 #include "materialcommon.h"
16 class MaterialInstance;
17 class ComputeMaterialInstance;
39 VkSampleCountFlagBits sampleCount,
53 VkFormat mColorFormat = VK_FORMAT_UNDEFINED;
54 VkFormat mDepthFormat = VK_FORMAT_UNDEFINED;
55 VkSampleCountFlagBits mSampleCount = VK_SAMPLE_COUNT_1_BIT;
56 bool mSampleShading =
false;
91 struct hash<
nap::PipelineKey>
95 size_t shader_hash = hash<size_t>{}((size_t)key.
mShader);
96 size_t draw_mode_hash = hash<size_t>{}((size_t)key.
mDrawMode);
97 size_t depth_mode_hash = hash<size_t>{}((size_t)key.
mDepthMode);
98 size_t blend_mode_hash = hash<size_t>{}((size_t)key.
mBlendMode);
100 size_t color_format_hash = hash<size_t>{}((size_t)key.
mColorFormat);
101 size_t depth_format_hash = hash<size_t>{}((size_t)key.
mDepthFormat);
102 size_t sample_count_hash = hash<size_t>{}((size_t)key.
mSampleCount);
103 size_t sample_shading_hash = hash<size_t>{}((size_t)key.
mSampleShading);
104 size_t cull_mode_hash = hash<size_t>{}((size_t)key.
mCullMode);
105 size_t poly_mode_hash = hash<size_t>{}((size_t)key.
mPolygonMode);
106 size_t constant_hash = hash<size_t>{}((size_t)key.
mConstantHash);
107 return shader_hash ^ draw_mode_hash ^ depth_mode_hash ^ blend_mode_hash ^ cull_winding_hash ^ color_format_hash ^ depth_format_hash ^ sample_count_hash ^ sample_shading_hash ^ cull_mode_hash ^ poly_mode_hash ^ constant_hash;
113 struct hash<
nap::ComputePipelineKey>
117 size_t shader_hash = hash<size_t>{}((size_t)key.
mShader);
118 size_t constant_hash = hash<size_t>{}((size_t)key.
mConstantHash);
119 return shader_hash ^ constant_hash;
ECullMode mCullMode
Definition: pipelinekey.h:57
uint ShaderConstantHash
Definition: materialcommon.h:71
ECullWindingOrder mCullWindingOrder
Definition: pipelinekey.h:52
EBlendMode mBlendMode
Definition: pipelinekey.h:51
EPolygonMode
Definition: mesh.h:55
EPolygonMode mPolygonMode
Definition: pipelinekey.h:58
EBlendMode
Definition: materialcommon.h:18
bool mSampleShading
Definition: pipelinekey.h:56
const ComputeShader * mShader
Definition: pipelinekey.h:77
ECullMode
Definition: mesh.h:43
EDepthMode
Definition: materialcommon.h:40
ECullWindingOrder
Definition: materialcommon.h:30
const Shader * mShader
Definition: pipelinekey.h:48
Definition: pipelinekey.h:24
Definition: pipelinekey.h:68
@ NotSet
Default value for MaterialInstances, means that the Material's blend is used instead.
VkSampleCountFlagBits mSampleCount
Definition: pipelinekey.h:55
@ ComputeShader
Points to a .comp file, must be used with EPropertyMetaData::FileLink.
EDrawMode mDrawMode
Definition: pipelinekey.h:49
@ NotSet
Default value for MaterialInstances, means that the Material's blend mode is used instead.
EDepthMode mDepthMode
Definition: pipelinekey.h:50
@ Back
Cull back facing triangles.
@ Fill
Polygons are interpreted and rendered using the specified 'EDrawMode'.
@ Triangles
Interpret the vertex data as a set of triangles.
Definition: templateapp.h:17
ShaderConstantHash mConstantHash
Definition: pipelinekey.h:59
VkFormat mDepthFormat
Definition: pipelinekey.h:54
EDrawMode
Definition: mesh.h:28
VkFormat mColorFormat
Definition: pipelinekey.h:53
ShaderConstantHash mConstantHash
Definition: pipelinekey.h:78