git.s-ol.nu ~forks/DiligentFX / 90332aa
GLTF: hacky VR rendering support s-ol a month ago
3 changed file(s) with 13 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
9696 IGLTFModel* GLTFModel,
9797 const GLTF_RenderInfo& RenderParams,
9898 GLTF_ModelResourceBindings* pModelBindings,
99 GLTF_ResourceCacheBindings* pCacheBindings = nullptr) override final;
99 GLTF_ResourceCacheBindings* pCacheBindings = nullptr,
100 IShaderResourceBinding* pExtraBinding = nullptr) override final;
100101
101102 /// Creates resource bindings for a given GLTF model
102103 virtual GLTF_ModelResourceBindings CreateResourceBindings(IGLTFModel* GLTFModel,
212212 IGLTFModel* GLTFModel,
213213 const GLTF_RenderInfo REF RenderParams,
214214 GLTF_ModelResourceBindings* pModelBindings,
215 GLTF_ResourceCacheBindings* pCacheBindings) PURE;
215 GLTF_ResourceCacheBindings* pCacheBindings,
216 IShaderResourceBinding* pExtraBinding) PURE;
216217
217218 /// Creates resource bindings for a given GLTF model
218219 VIRTUAL GLTF_ModelResourceBindings METHOD(CreateResourceBindings)(THIS_
298298 // clang-format off
299299 std::vector<ShaderResourceVariableDesc> Vars =
300300 {
301 {SHADER_TYPE_GEOMETRY, "Views", SHADER_RESOURCE_VARIABLE_TYPE_STATIC},
301302 {SHADER_TYPE_VERTEX, "cbTransforms", SHADER_RESOURCE_VARIABLE_TYPE_STATIC},
302303 {SHADER_TYPE_PIXEL, "cbGLTFAttribs", SHADER_RESOURCE_VARIABLE_TYPE_STATIC},
303304 {SHADER_TYPE_VERTEX, "cbJointTransforms", SHADER_RESOURCE_VARIABLE_TYPE_STATIC}
343344 PSOCreateInfo.pVS = pVS;
344345 PSOCreateInfo.pPS = pPS;
345346
346 if (m_Settings.pGS)
347 if (m_Settings.pGS) {
348 PSODesc.SeparateGeometrySignature = true;
347349 PSOCreateInfo.pGS = m_Settings.pGS;
350 }
348351
349352 {
350353 PSOKey Key{GLTF_MAT_ALPHA_MODE_OPAQUE, false};
861864 IGLTFModel* _GLTFModel,
862865 const GLTF_RenderInfo& RenderParams,
863866 GLTF_ModelResourceBindings* pModelBindings,
864 GLTF_ResourceCacheBindings* pCacheBindings)
867 GLTF_ResourceCacheBindings* pCacheBindings,
868 IShaderResourceBinding* pExtraBinding)
865869 {
866870 auto& GLTFModel = *static_cast<GLTF::Model*>(_GLTFModel);
867871
935939 {
936940 VERIFY_EXPR(pCurrPSO == GetPSO(PSOKey{AlphaMode, material.DoubleSided}));
937941 }
942
943 if (pExtraBinding)
944 pCtx->CommitShaderResources(pExtraBinding, RESOURCE_STATE_TRANSITION_MODE_TRANSITION);
938945
939946 if (pModelBindings != nullptr)
940947 {