コード例 #1
0
ファイル: DepthMap.hpp プロジェクト: Kingwl/aMazing
	void Render(ID3D11Device* device,
		ID3D11DeviceContext* context,
		common_tool::functionType<std::function<void(ID3D11Device*, ID3D11DeviceContext*)> > renderFunction)
	{
		clearRenderTarget(device, context);
		clearDepthStencil(device, context);
		setRenderTarget(device, context);
		SHADERS.bindPair("DepthMap", device, context);
		SHADERS.DisableShaderBind();
		renderFunction(device, context);
		SHADERS.EnableShaderBind();
	}
コード例 #2
0
ファイル: DepthField.hpp プロジェクト: ruleless/aMazing
	void Render(ID3D11Device* device,
		ID3D11DeviceContext* context,
		std::function<void(ID3D11Device*, ID3D11DeviceContext*)> renderFunction)
	{
		tex2d->clearDepthBuffer(device, context);
		tex2d->clearRenderTarget(device, context);
		tex2d->setRenderTarget(device, context);
		renderFunction(device, context);

		depthMap->Render(device, context, renderFunction);
		blur->Render(device, context, 3, 3, renderFunction);
		
		clearDepthStencil(device, context);
		clearRenderTarget(device, context);
		setRenderTarget(device, context);
		SHADERS.bindPair("DepthFieldMerge", device, context);
		tex2d->bindPS(device, context, 0);
		blur->bindPS(device, context, 1);
		depthMap->bindPS(device,context,2);
		GRAPHICS.RenderRectangle(0, 0, WINWIDTH, WINHEIGHT);
	}