Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mShader = mRenderer->GetShaderManager()->GetNode("Textured");
- if (mShader == nullptr)
- {
- D3DShader* shader = new D3DShader(mLog, "../Data/Shaders/Geometry/Textured.hlsl",
- std::vector<ShaderEntryPoint>
- {
- Engine::ShaderEntryPoint(Engine::ShaderType::AMPLIFICATION_SHADER, L"AS"),
- Engine::ShaderEntryPoint(Engine::ShaderType::MESH_SHADER, L"MS"),
- Engine::ShaderEntryPoint(Engine::ShaderType::PIXEL_SHADER, L"PS")
- },
- std::vector<ShaderDefine>
- {
- Engine::ShaderDefine(L"USE_MESH_SHADERS", std::to_wstring(1)),
- Engine::ShaderDefine(L"VERTEX_SIZE", std::to_wstring(16)),
- Engine::ShaderDefine(L"VERTEX_POSITION_OFFSET", std::to_wstring(0)),
- Engine::ShaderDefine(L"VERTEX_TEXCOORD_OFFSET", std::to_wstring(12)),
- Engine::ShaderDefine(L"VERTEX_NORMAL_OFFSET", std::to_wstring(3)),
- Engine::ShaderDefine(L"VERTEX_TANGENT_OFFSET", std::to_wstring(6)),
- Engine::ShaderDefine(L"VERTEX_BITANGENT_OFFSET", std::to_wstring(9)),
- #ifdef USE_QUANTIZED_MESHLET_INDICES
- Engine::ShaderDefine(L"USE_QUANTIZED_MESHLET_INDICES", L"1"),
- #else
- Engine::ShaderDefine(L"USE_QUANTIZED_MESHLET_INDICES", L"0"),
- #endif
- Engine::ShaderDefine(L"DEBUG_CLUSTERS", L"0")
- });
- mRenderer->GetShaderManager()->Insert("Textured", shader);
- mShader = mRenderer->GetShaderManager()->GetNode("Textured");
- }
- mRenderer->RegisterShaderMapping(mShader->Get(), this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement