diff --git a/Samples/HolographicTagAlong/cpp/Content/CreateDistanceFieldPixelShader.hlsl b/Samples/HolographicTagAlong/cpp/Content/CreateDistanceFieldPixelShader.hlsl deleted file mode 100644 index 71eed43c3b..0000000000 --- a/Samples/HolographicTagAlong/cpp/Content/CreateDistanceFieldPixelShader.hlsl +++ /dev/null @@ -1,96 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -// The pixel multiplier is a function of the ratio of source to target resolution. -#define PIXEL_MULTIPLIER_X 8 -#define PIXEL_MULTIPLIER_Y 8 - -// Ideal kernel size is coupled to the source texture resolution. -#define KERNEL_SIZE 64 -#define KERNEL_RADIUS (KERNEL_SIZE / 2) -#define ONE_OVER_KERNEL_SIZE (1.f / KERNEL_SIZE) - -// Per-pixel color data passed through the pixel shader. -struct PixelShaderInput -{ - min16float4 screenSpacePos : SV_POSITION; -}; - -Texture2D tex : t0; - -// Writes the output of a signed distance function, centered at the pixel's position, searching -// along the X and Y axes for the closest line boundary in each direction. -min16float2 main(PixelShaderInput input) : SV_TARGET -{ - // The pixel center should be taken in source texture space. - int2 pixelCenter = int2(input.screenSpacePos.x, input.screenSpacePos.y) * - int2(PIXEL_MULTIPLIER_X, PIXEL_MULTIPLIER_Y); - - // Determine where the pixel is in relation to the line boundary. - // If the pixel is above the threshold, it is inside the region that will be drawn. - const float thresholdForActivePixel = 0.5f; - bool pixelIsIn = tex.Load(int3(pixelCenter, 0)).x >= thresholdForActivePixel; - - // Search for the closest pixel of the opposing status. - const int veryLargeDistanceSquared = 1e9; - int2 minDistance = veryLargeDistanceSquared.xx; - for (int i = 0; i < KERNEL_SIZE; ++i) - { - // Offset to use in this iteration of the bidirectional search. - int offset = i - KERNEL_RADIUS; - - // Look up the current X and Y pixels. - int3 pixelXLocation = int3(pixelCenter + int2(offset, 0), 0); - int3 pixelYLocation = int3(pixelCenter + int2(0, offset), 0); - float2 texelValues = float2(tex.Load(pixelXLocation).x, tex.Load(pixelYLocation).x); - - // Determine whether or not the pixel is of the opposing status, in vs. out. - bool2 neighboringPixelIsInteresting = false; - /* - if (pixelIsIn) - { - neighboringPixelIsInteresting.x = texelValues.x < thresholdForActivePixel; - neighboringPixelIsInteresting.y = texelValues.y < thresholdForActivePixel; - } - else - { - neighboringPixelIsInteresting.x = texelValues.x >= thresholdForActivePixel; - neighboringPixelIsInteresting.y = texelValues.y >= thresholdForActivePixel; - }*/ - // This provides a result equivalent to the comparisons above, but without branching. - neighboringPixelIsInteresting = - (pixelIsIn & (texelValues < thresholdForActivePixel)) | - ((!pixelIsIn) & (texelValues >= thresholdForActivePixel)); - - // For interesting pixels only, store the distance if it is closer. - int distance = abs(offset); - minDistance = neighboringPixelIsInteresting && (distance < minDistance) ? distance : minDistance; - } - - // Transform the distance function from the range [-KERNEL_RADIUS, KERNEL_RADIUS] to the range [0, 1]. - // -KERNEL_RADIUS should map to 0, and KERNEL_RADIUS should map to 1. - float2 mappedDistanceValue = saturate(minDistance * ONE_OVER_KERNEL_SIZE + 0.5f); - - // The distance function is signed. - if (pixelIsIn) - { - // A falloff adds some accuracy to the edge interpolation. - mappedDistanceValue = mappedDistanceValue * mappedDistanceValue; - } - else - { - // A falloff adds some accuracy to the edge interpolation. - // Also transform the pixel to the range [0.0, 0.5]. - mappedDistanceValue = -mappedDistanceValue * mappedDistanceValue + 0.5f; - } - - return min16float2(mappedDistanceValue.xy); -} diff --git a/Samples/HolographicTagAlong/cpp/Content/DistanceFieldRenderer.cpp b/Samples/HolographicTagAlong/cpp/Content/DistanceFieldRenderer.cpp deleted file mode 100644 index 5c30d5bf0e..0000000000 --- a/Samples/HolographicTagAlong/cpp/Content/DistanceFieldRenderer.cpp +++ /dev/null @@ -1,272 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -#include "pch.h" - -#include "Common\DirectXHelper.h" -#include "Content\ShaderStructures.h" -#include "DistanceFieldRenderer.h" - -using namespace Concurrency; -using namespace DirectX; -using namespace HolographicTagAlongSample; - -DistanceFieldRenderer::DistanceFieldRenderer(const std::shared_ptr& deviceResources, unsigned int const& textureWidth, unsigned int const& textureHeight) - : m_deviceResources(deviceResources), - m_textureWidth(textureWidth), - m_textureHeight(textureHeight) -{ - CreateDeviceDependentResources(); -} - -void DistanceFieldRenderer::RenderDistanceField(ID3D11ShaderResourceView* texture) -{ - // Loading is asynchronous. Resources must be created before drawing can occur. - if (!m_loadingComplete) - { - return; - } - - const auto context = m_deviceResources->GetD3DDeviceContext(); - - // Set and clear the off-screen render target. - ID3D11RenderTargetView *const targets[1] = { m_renderTargetView.Get() }; - context->OMSetRenderTargets(1, targets, m_d3dDepthStencilView.Get()); - context->ClearRenderTargetView(targets[0], DirectX::Colors::Transparent); - context->ClearDepthStencilView(m_d3dDepthStencilView.Get(), D3D11_CLEAR_DEPTH, 1.0f, 0); - - // Set the viewport to cover the whole texture. - CD3D11_VIEWPORT viewport = CD3D11_VIEWPORT( - 0.f, 0.f, - static_cast(m_textureWidth), - static_cast(m_textureHeight)); - context->RSSetViewports(1, &viewport); - - // Each vertex is one instance of the XMFLOAT2 struct. - const UINT stride = m_vertexStride; - const UINT offset = 0; - context->IASetVertexBuffers( - 0, - 1, - m_vertexBuffer.GetAddressOf(), - &stride, - &offset - ); - context->IASetIndexBuffer( - m_indexBuffer.Get(), - DXGI_FORMAT_R16_UINT, // Each index is one 16-bit unsigned integer (short). - 0 - ); - context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); - context->IASetInputLayout(m_inputLayout.Get()); - - // Attach the vertex shader. - context->VSSetShader( - m_vertexShader.Get(), - nullptr, - 0 - ); - - // Attach the pixel shader. - context->PSSetShader( - m_pixelShader.Get(), - nullptr, - 0 - ); - context->PSSetShaderResources( - 0, - 1, - &texture - ); - - // Draw the objects. - context->DrawIndexed( - m_indexCount, // Index count. - 0, // Start index location. - 0 // Base vertex location. - ); - - ++m_renderCount; -} - -void DistanceFieldRenderer::ReleaseDeviceDependentResources() -{ - m_loadingComplete = false; - - m_vertexShader.Reset(); - m_inputLayout.Reset(); - m_pixelShader.Reset(); - - m_vertexBuffer.Reset(); - m_indexBuffer.Reset(); - - m_texture.Reset(); - m_shaderResourceView.Reset(); - m_renderTargetView.Reset(); -} - -void DistanceFieldRenderer::CreateDeviceDependentResources() -{ - // Create the texture that will be used as the offscreen render target. - CD3D11_TEXTURE2D_DESC textureDesc( - DXGI_FORMAT_R8G8_UNORM, - m_textureWidth, - m_textureHeight, - 1, - 1, - D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET - ); - m_deviceResources->GetD3DDevice()->CreateTexture2D(&textureDesc, nullptr, &m_texture); - - // Create read and write views for the offscreen render target. - m_deviceResources->GetD3DDevice()->CreateShaderResourceView(m_texture.Get(), nullptr, &m_shaderResourceView); - m_deviceResources->GetD3DDevice()->CreateRenderTargetView(m_texture.Get(), nullptr, &m_renderTargetView); - - - // Create a depth stencil view. - // NOTE: This is used only for drawing. It could be recycled for additional distance rendering - // passes, and discarded after all distance fields have been created (as could the index - // and vertex buffers). - CD3D11_TEXTURE2D_DESC depthStencilDesc( - DXGI_FORMAT_D16_UNORM, - m_textureWidth, - m_textureHeight, - 1, // One array level. - 1, // Use a single mipmap level. - D3D11_BIND_DEPTH_STENCIL - ); - - Microsoft::WRL::ComPtr depthStencil; - DX::ThrowIfFailed( - m_deviceResources->GetD3DDevice()->CreateTexture2D( - &depthStencilDesc, - nullptr, - &depthStencil - ) - ); - - CD3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc(D3D11_DSV_DIMENSION_TEXTURE2D); - DX::ThrowIfFailed( - m_deviceResources->GetD3DDevice()->CreateDepthStencilView( - depthStencil.Get(), - &depthStencilViewDesc, - &m_d3dDepthStencilView - ) - ); - - - // Load shaders asynchronously. - task> loadVSTask = DX::ReadDataAsync(L"ms-appx:///FullscreenQuadVertexShader.cso"); - task> loadPSTask = DX::ReadDataAsync(L"ms-appx:///CreateDistanceFieldPixelShader.cso"); - - // After the vertex shader file is loaded, create the shader and input layout. - task createVSTask = loadVSTask.then([this](const std::vector& fileData) - { - DX::ThrowIfFailed( - m_deviceResources->GetD3DDevice()->CreateVertexShader( - fileData.data(), - fileData.size(), - nullptr, - &m_vertexShader - ) - ); - - constexpr std::array vertexDesc = - {{ - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 } - }}; - - DX::ThrowIfFailed( - m_deviceResources->GetD3DDevice()->CreateInputLayout( - vertexDesc.data(), - vertexDesc.size(), - fileData.data(), - fileData.size(), - &m_inputLayout - ) - ); - }); - - // After the pixel shader file is loaded, create the shader and constant buffer. - task createPSTask = loadPSTask.then([this](const std::vector& fileData) - { - DX::ThrowIfFailed( - m_deviceResources->GetD3DDevice()->CreatePixelShader( - fileData.data(), - fileData.size(), - nullptr, - &m_pixelShader - ) - ); - }); - - // Once all shaders are loaded, create the mesh. - task createQuadTask = (createPSTask && createVSTask).then([this]() - { - // Load mesh vertices for a full-screen quad. - static const std::array quadVertices = - {{ - { XMFLOAT2(-1.0f, 1.0f) }, - { XMFLOAT2( 1.0f, 1.0f) }, - { XMFLOAT2( 1.0f, -1.0f) }, - { XMFLOAT2(-1.0f, -1.0f) }, - }}; - - m_vertexStride = sizeof(XMFLOAT2); - - D3D11_SUBRESOURCE_DATA vertexBufferData = { 0 }; - vertexBufferData.pSysMem = quadVertices.data(); - vertexBufferData.SysMemPitch = 0; - vertexBufferData.SysMemSlicePitch = 0; - const CD3D11_BUFFER_DESC vertexBufferDesc(m_vertexStride * quadVertices.size(), D3D11_BIND_VERTEX_BUFFER); - DX::ThrowIfFailed( - m_deviceResources->GetD3DDevice()->CreateBuffer( - &vertexBufferDesc, - &vertexBufferData, - &m_vertexBuffer - ) - ); - - // Load mesh indices. Each trio of indices represents - // a triangle to be rendered on the screen. - // For example: 2,1,0 means that the vertices with indexes - // 2, 1, and 0 from the vertex buffer compose the - // first triangle of this mesh. - // Note that the winding order is clockwise by default. - constexpr std::array quadIndices = - {{ - // -z - 0,2,3, - 0,1,2, - }}; - - m_indexCount = quadIndices.size(); - - D3D11_SUBRESOURCE_DATA indexBufferData = { 0 }; - indexBufferData.pSysMem = quadIndices.data(); - indexBufferData.SysMemPitch = 0; - indexBufferData.SysMemSlicePitch = 0; - const CD3D11_BUFFER_DESC indexBufferDesc(sizeof(unsigned short) * quadIndices.size(), D3D11_BIND_INDEX_BUFFER); - DX::ThrowIfFailed( - m_deviceResources->GetD3DDevice()->CreateBuffer( - &indexBufferDesc, - &indexBufferData, - &m_indexBuffer - ) - ); - }); - - auto loadingCompleteTask = createQuadTask.then([this]() { - - m_loadingComplete = true; - }); -} - diff --git a/Samples/HolographicTagAlong/cpp/Content/DistanceFieldRenderer.h b/Samples/HolographicTagAlong/cpp/Content/DistanceFieldRenderer.h deleted file mode 100644 index 4c2969201e..0000000000 --- a/Samples/HolographicTagAlong/cpp/Content/DistanceFieldRenderer.h +++ /dev/null @@ -1,58 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -#pragma once - -#include "common\DeviceResources.h" - -namespace HolographicTagAlongSample -{ - class DistanceFieldRenderer - { - public: - DistanceFieldRenderer(const std::shared_ptr& deviceResources, unsigned int const& textureWidth, unsigned int const& textureHeight); - - void RenderDistanceField(ID3D11ShaderResourceView* texture); - - void CreateDeviceDependentResources(); - void ReleaseDeviceDependentResources(); - - ID3D11ShaderResourceView* GetTexture() const { return m_shaderResourceView.Get(); }; - unsigned int const& GetRenderCount() const { return m_renderCount; }; - - private: - // Cached pointer to device resources. - const std::shared_ptr m_deviceResources; - - // Direct3D resources for filtering a texture to an off-screen render target. - Microsoft::WRL::ComPtr m_inputLayout; - Microsoft::WRL::ComPtr m_vertexBuffer; - Microsoft::WRL::ComPtr m_indexBuffer; - Microsoft::WRL::ComPtr m_vertexShader; - Microsoft::WRL::ComPtr m_pixelShader; - Microsoft::WRL::ComPtr m_texture; - Microsoft::WRL::ComPtr m_shaderResourceView; - Microsoft::WRL::ComPtr m_d3dDepthStencilView; - Microsoft::WRL::ComPtr m_renderTargetView; - - // CPU-based variables for configuring the offscreen render target. - const UINT m_textureWidth; - const UINT m_textureHeight; - - // System resources for quad geometry. - uint32 m_indexCount = 0; - uint32 m_vertexStride = 0; - - // Variables used with the rendering loop. - bool m_loadingComplete = false; - unsigned int m_renderCount = 0; - }; -} \ No newline at end of file diff --git a/Samples/HolographicTagAlong/cpp/Content/QuadRenderer.cpp b/Samples/HolographicTagAlong/cpp/Content/QuadRenderer.cpp index bf162f4ef1..11142de7e1 100644 --- a/Samples/HolographicTagAlong/cpp/Content/QuadRenderer.cpp +++ b/Samples/HolographicTagAlong/cpp/Content/QuadRenderer.cpp @@ -285,7 +285,7 @@ void QuadRenderer::CreateDeviceDependentResources() // Load shaders asynchronously. task> loadVSTask = DX::ReadDataAsync(vertexShaderFileName); - task> loadPSTask = DX::ReadDataAsync(L"ms-appx:///UseDistanceFieldPixelShader.cso"); + task> loadPSTask = DX::ReadDataAsync(L"ms-appx:///TexturePixelShader.cso"); task> loadGSTask; if (!m_usingVprtShaders) diff --git a/Samples/HolographicTagAlong/cpp/Content/UseDistanceFieldPixelShader.hlsl b/Samples/HolographicTagAlong/cpp/Content/UseDistanceFieldPixelShader.hlsl deleted file mode 100644 index fd43459387..0000000000 --- a/Samples/HolographicTagAlong/cpp/Content/UseDistanceFieldPixelShader.hlsl +++ /dev/null @@ -1,59 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -// Per-pixel color data passed through to the pixel shader. -struct PixelShaderInput -{ - min16float4 pos : SV_POSITION; - min16float3 color : COLOR0; - min16float2 texCoord : TEXCOORD1; -}; - -Texture2D tex : t0; -SamplerState samp : s0; - -// A smooth step function is used to blend across a one-pixel region. -#define DISTANCE_MAX 0.30f -#define DISTANCE_MIN (DISTANCE_MAX - 0.01f) - -// The pixel shader renders a color value based on a bidirectional distance function -// that is read from a texture. -min16float4 main(PixelShaderInput input) : SV_TARGET -{ - // Read both distance function values. - min16float2 textureValue = min16float2(tex.Sample(samp, input.texCoord).xy); - - // Clamp the alpha test value to a smooth step in the range [0, 1]. - float2 steppedValues = smoothstep(DISTANCE_MIN, DISTANCE_MAX, textureValue); - - // AND the distance function results. - float multiplier = min(steppedValues.x, steppedValues.y); - - // Apply the result. - return min16float4(input.color, 1.f) * multiplier; - - // The lines of code above are approximately equivalent to the following. - /*min16float2 textureValue = min16float2(tex.Sample(samp, input.texCoord).xy); - if ((textureValue.x >= DISTANCE_MAX) && (textureValue.y >= DISTANCE_MAX)) - { - return min16float4(input.color, 1.f); - } - else if ((textureValue.x >= DISTANCE_MIN) && (textureValue.y >= DISTANCE_MIN)) - { - // smooth step function - float multiplier = (textureValue - DISTANCE_MIN) * (1.f / (DISTANCE_MAX - DISTANCE_MIN)); - return min16float4(input.color * multiplier, 1.f); - } - else - { - return min16float4(0.f, 0.f, 0.f, 0.f); - }*/ -} diff --git a/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj b/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj index a01a54f8ae..5025d8fdd9 100644 --- a/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj +++ b/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj @@ -81,7 +81,6 @@ - @@ -94,7 +93,6 @@ - @@ -110,12 +108,6 @@ - - Pixel - Pixel - 4.0 - 4.0 - Vertex Vertex @@ -126,10 +118,6 @@ Pixel 4.0 - - Pixel - 5.0 - Vertex 5.0 diff --git a/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj.filters b/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj.filters index 98fd006d4e..1b76423fbc 100644 --- a/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj.filters +++ b/Samples/HolographicTagAlong/cpp/HolographicTagAlong.vcxproj.filters @@ -46,9 +46,6 @@ Content - - Content - Content @@ -69,9 +66,6 @@ Content - - Content - Content @@ -89,12 +83,6 @@ Content\Shaders - - Content\Shaders - - - Content\Shaders - Content\Shaders @@ -125,9 +113,6 @@ Assets - - - Content diff --git a/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.cpp b/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.cpp index 5001efef2b..bf9d7d560e 100644 --- a/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.cpp +++ b/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.cpp @@ -49,15 +49,6 @@ void HolographicTagAlongSampleMain::SetHolographicSpace(HolographicSpace^ hologr constexpr unsigned int offscreenRenderTargetWidth = 2048; m_textRenderer = std::make_unique(m_deviceResources, offscreenRenderTargetWidth, offscreenRenderTargetWidth); - // Initialize the distance renderer. - // The algorithm seems to break down if the target width is any smaller than 16 times the source width. - // This is sufficient to reduce the memory requirement for the text message texture by a factor of 768, given the - // reduction in channels: - // * Memory required to store the offscreen DirectWrite source texture: 2048 * 2048 * 3 = 12,582,912 bytes - // * Memory required to store the offscreen distance field texture: 128 * 128 * 1 = 16,384 bytes - constexpr unsigned int blurTargetWidth = 256; - m_distanceFieldRenderer = std::make_unique(m_deviceResources, blurTargetWidth, blurTargetWidth); - // Use DirectWrite to create a high-resolution, antialiased image of vector-based text. RenderOffscreenTexture(); @@ -292,16 +283,6 @@ bool HolographicTagAlongSampleMain::Render(Windows::Graphics::Holographic::Holog holographicFrame->UpdateCurrentPrediction(); HolographicFramePrediction^ prediction = holographicFrame->CurrentPrediction; - // Off-screen drawing used by all cameras. - // The distance function texture only needs to be created once, for a given text string. - if (m_distanceFieldRenderer->GetRenderCount() == 0) - { - m_distanceFieldRenderer->RenderDistanceField(m_textRenderer->GetTexture()); - - // The 2048x2048 texture will not be needed again, unless we get hit DeviceLost scenario. - m_textRenderer->ReleaseDeviceDependentResources(); - } - bool atLeastOneCameraRendered = false; for (auto cameraPose : prediction->CameraPoses) { @@ -339,7 +320,7 @@ bool HolographicTagAlongSampleMain::Render(Windows::Graphics::Holographic::Holog if (cameraActive) { // Draw the sample hologram. - m_quadRenderer->Render(m_distanceFieldRenderer->GetTexture()); + m_quadRenderer->Render(m_textRenderer->GetTexture()); } #endif atLeastOneCameraRendered = true; @@ -370,7 +351,6 @@ void HolographicTagAlongSampleMain::OnDeviceLost() { #ifdef DRAW_SAMPLE_CONTENT m_quadRenderer->ReleaseDeviceDependentResources(); - m_distanceFieldRenderer->ReleaseDeviceDependentResources(); m_textRenderer->ReleaseDeviceDependentResources(); #endif } @@ -382,7 +362,6 @@ void HolographicTagAlongSampleMain::OnDeviceRestored() #ifdef DRAW_SAMPLE_CONTENT m_quadRenderer->CreateDeviceDependentResources(); m_textRenderer->CreateDeviceDependentResources(); - m_distanceFieldRenderer->CreateDeviceDependentResources(); RenderOffscreenTexture(); #endif } diff --git a/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.h b/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.h index 472487c548..c96c34d56f 100644 --- a/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.h +++ b/Samples/HolographicTagAlong/cpp/HolographicTagAlongSampleMain.h @@ -19,7 +19,6 @@ #include "Common\StepTimer.h" #ifdef DRAW_SAMPLE_CONTENT -#include "Content\DistanceFieldRenderer.h" #include "Content\SpatialInputHandler.h" #include "Content\TextRenderer.h" #include "Content\QuadRenderer.h" @@ -83,9 +82,6 @@ namespace HolographicTagAlongSample // Renders text off-screen. Used to create a texture to render on the quad. std::unique_ptr m_textRenderer; - // Performs a gather operation to create a 2D pixel distance map. - std::unique_ptr m_distanceFieldRenderer; - // Listens for the Pressed spatial input event. std::shared_ptr m_spatialInputHandler; #endif