Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
476 changes: 476 additions & 0 deletions Common/Dx11-Shader/TV_shader.cpp

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions Common/Dx11-Shader/TV_shader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// TV_shader.h
#pragma once
#include <DirectXMath.h>

extern const int TVShader_VS_size;
extern const BYTE TVShader_VS[];

extern const int TVShader_PS_size;
extern const BYTE TVShader_PS[];

struct PerFrameBuffer
{
DirectX::XMFLOAT4 resolution;
float time;
float padding[3]; // Align to 16 bytes
};
477 changes: 477 additions & 0 deletions Common/Include/crt_shader.h

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions Common/Include/frame_handler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef FRAME_HANDLER_H
#define FRAME_HANDLER_H

#include <d3d11.h>
#include <dxgi1_2.h>
#include <DirectXMath.h>
#include <wdf.h>
#include <iddcx.h>

struct PerFrameBuffer {
DirectX::XMFLOAT4 resolution;
float time;
float padding[3];
};

class FrameHandler {
public:
static ID3D11Device* g_device;
static ID3D11DeviceContext* g_deviceContext;
static ID3D11VertexShader* g_vertexShader;
static ID3D11PixelShader* g_pixelShader;
static ID3D11InputLayout* g_inputLayout;
static ID3D11Buffer* g_constantBuffer;
static ID3D11RenderTargetView* g_outputRTV;
static bool enabled;

static void InitializeFrameHandler(ID3D11Device* device, ID3D11DeviceContext* context, const wchar_t* shaderFilePath);
static NTSTATUS AssignSwapChain(IDDCX_SWAPCHAIN hSwapChain, IDXGISwapChain* dxgiSwapChain);
static void ProcessFrame(IDDCX_SWAPCHAIN hSwapChain, LARGE_INTEGER PresentationTime);
static bool IsEnabled() { return enabled; }
};

#endif
Loading