Ejemplo n.º 1
0
 void UnbindShadowsForForwardResolve(
     Metal::DeviceContext& metalContext,
     Techniques::ParsingContext& parsingContext)
 {
     metalContext.UnbindPS<Metal::ShaderResourceView>(3,1);   // unbind shadow textures
     auto& rtState = parsingContext.GetTechniqueContext()._runtimeState;
     rtState.SetParameter(u("SHADOW_CASCADE_MODE"), 0);
     rtState.SetParameter(u("SHADOW_ENABLE_NEAR_CASCADE"), 0);
 }
Ejemplo n.º 2
0
    Techniques::ResolvedShader TechniqueMaterial::FindVariation(
        Techniques::ParsingContext& parsingContext,
        unsigned techniqueIndex, const char shaderName[]) const
    {
        const ParameterBox* state[] = {
            &_geometryParameters, 
            &parsingContext.GetTechniqueContext()._globalEnvironmentState,
            &parsingContext.GetTechniqueContext()._runtimeState, 
            &_materialParameters
        };

        auto& shaderType = ::Assets::GetAssetDep<Techniques::ShaderType>(shaderName);
        return shaderType.FindVariation(techniqueIndex, state, _techniqueInterface);
    }