예제 #1
0
	SelectionRenderer::SelectionRenderer()
		:mCore(nullptr)
	{
		HMaterial selectionMat = BuiltinEditorResources::instance().createSelectionMat();
			
		mCore.store(bs_new<SelectionRendererCore>(SelectionRendererCore::PrivatelyConstuct()), std::memory_order_release);

		gCoreAccessor().queueCommand(std::bind(&SelectionRenderer::initializeCore, this, selectionMat->getCore()));
	}
예제 #2
0
	/** Create a material using the active shader, and assign the relevant textures to it. */
	void createMaterial(Assets& assets)
	{
		// Create a material with the active shader.
		HMaterial exampleMaterial = Material::create(assets.exampleShader);

        // Assign the four textures requires by the PBS shader
        exampleMaterial->setTexture("gAlbedoTex", assets.exampleAlbedoTex);
        exampleMaterial->setTexture("gNormalTex", assets.exampleNormalsTex);
        exampleMaterial->setTexture("gRoughnessTex", assets.exampleRoughnessTex);
        exampleMaterial->setTexture("gMetalnessTex", assets.exampleMetalnessTex);

		assets.exampleMaterial = exampleMaterial;
	}
예제 #3
0
	SelectionRenderer::SelectionRenderer()
	{
		HMaterial selectionMat = BuiltinEditorResources::instance().createSelectionMat();
			
		mRenderer = RendererExtension::create<ct::SelectionRendererCore>(selectionMat->getCore());
	}