bool initializeRenderingResources(Renderer* pRenderer, RenderTarget* pRenderTarget) { // SHADER //---------------------------------------------------------------------------------------------------------------- ShaderLoadDesc paniniPass = {}; paniniPass.mStages[0] = { "panini_projection.vert", NULL, 0, FSR_SrcShaders_Common }; paniniPass.mStages[1] = { "panini_projection.frag", NULL, 0, FSR_SrcShaders_Common }; addShader(pRenderer, &paniniPass, &pShaderPanini); // SAMPLERS & STATES //---------------------------------------------------------------------------------------------------------------- addSampler(pRenderer, &pSamplerTrilinearAniso, FILTER_TRILINEAR_ANISO, FILTER_BILINEAR, MIPMAP_MODE_LINEAR, ADDRESS_MODE_REPEAT, ADDRESS_MODE_REPEAT, ADDRESS_MODE_REPEAT, 0.0f, 8.0f); addRasterizerState(&pRasterizerStateCullNone, CULL_MODE_NONE); addDepthState(pRenderer, &pDepthStateDisable, false, false); // ROOT SIGNATURE //---------------------------------------------------------------------------------------------------------------- RootSignatureDesc paninniRootDesc = {}; paninniRootDesc.mStaticSamplers["uSampler"] = pSamplerTrilinearAniso; addRootSignature(pRenderer, 1, &pShaderPanini, &pRootSignaturePaniniPostProcess, &paninniRootDesc); // PIPELINE //---------------------------------------------------------------------------------------------------------------- VertexLayout vertexLayoutPanini = {}; vertexLayoutPanini.mAttribCount = 1; vertexLayoutPanini.mAttribs[0].mSemantic = SEMANTIC_POSITION; vertexLayoutPanini.mAttribs[0].mFormat = ImageFormat::RGBA32F; vertexLayoutPanini.mAttribs[0].mBinding = 0; vertexLayoutPanini.mAttribs[0].mLocation = 0; vertexLayoutPanini.mAttribs[0].mOffset = 0; GraphicsPipelineDesc pipelineSettings = { 0 }; pipelineSettings.mPrimitiveTopo = PRIMITIVE_TOPO_TRI_LIST; pipelineSettings.mRenderTargetCount = 1; pipelineSettings.pDepthState = pDepthStateDisable; pipelineSettings.pColorFormats = &pRenderTarget->mDesc.mFormat; pipelineSettings.pSrgbValues = &pRenderTarget->mDesc.mSrgb; pipelineSettings.mSampleCount = pRenderTarget->mDesc.mSampleCount; pipelineSettings.mSampleQuality = pRenderTarget->mDesc.mSampleQuality; pipelineSettings.pRasterizerState = pRasterizerStateCullNone; pipelineSettings.pRootSignature = pRootSignaturePaniniPostProcess; pipelineSettings.pShaderProgram = pShaderPanini; pipelineSettings.pVertexLayout = &vertexLayoutPanini; addPipeline(pRenderer, &pipelineSettings, &pPipielinePaniniPostProcess); createTessellatedQuadBuffers(&pVertexBufferTessellatedQuad, &pIndexBufferTessellatedQuad, gPaniniDistortionTessellation[0], gPaniniDistortionTessellation[1]); #if USE_DEDICATED_COMMAND_LIST // COMMAND LIST //---------------------------------------------------------------------------------------------------------------- addCmdPool(pRenderer, pGraphicsQueue, false, &pPaniniCmdPool); addCmd_n(pPaniniCmdPool, false, imageCount, &ppPaniniCmds); #endif return true; }
void PipelineComboBox::init( const QString& resourcePath ) { clear(); m_resourcePath = resourcePath; blockSignals(true); addPipeline(resourcePath); addItem(tr("Import from Repository"), QVariant((int) QVariant::UserType)); if (count() == 1) setCurrentIndex(-1); blockSignals(false); }
foreach(QFileInfo directory, pipelineDirs) { addPipeline(directory.absoluteFilePath()); }