forked from AmigurumiShaders/DX11Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBufferStructs.h
More file actions
70 lines (61 loc) · 1.51 KB
/
BufferStructs.h
File metadata and controls
70 lines (61 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#include <DirectXMath.h>
#include "Lights.h"
#include "SDFShapes.h"
//basic vertex and pixel shader data
struct VertexShaderExternalData
{
DirectX::XMFLOAT4X4 world;
DirectX::XMFLOAT4X4 worldInverseTranspose;
DirectX::XMFLOAT4X4 view;
DirectX::XMFLOAT4X4 projection;
};
struct PixelShaderExternalData
{
DirectX::XMFLOAT4 colorTint;
DirectX::XMFLOAT2 uvScale;
DirectX::XMFLOAT2 uvOffset;
DirectX::XMFLOAT3 cameraPosition;
int lightCount;
Light lights[MAX_LIGHTS];
};
// Overall scene data for raytracing
struct RaytracingSceneData
{
DirectX::XMFLOAT4X4 inverseViewProjection;
DirectX::XMFLOAT3 cameraPosition;
float pad;
};
//raymarching shader data
struct RaymarchVSExternalData
{
//UINT id;
DirectX::XMFLOAT4X4 view;
DirectX::XMFLOAT4X4 projection;
DirectX::XMFLOAT4X4 inverseViewProjection;
DirectX::XMFLOAT3 frustum[4];
};
struct RaymarchPSExternalData
{
// TODO : To seperate Camera and Light into different c_buffers
DirectX::XMFLOAT3A cameraPosition;
DirectX::XMFLOAT3A cameraForward;
DirectX::XMFLOAT3A cameraRight;
DirectX::XMFLOAT3A cameraUp;
DirectX::XMFLOAT3 bgColor;
int boxCount=0;
DirectX::XMFLOAT3 lightPosition = { 5.0, 10.0 , 0.0 };
int sphereCount=0;
int torusCount=0;
int roundBoxCount=0;
int cylinderCount=0;
int coneCount=0;
SDFPrimRenderData spherePrims[MAX_SDF_COUNT];
SDFPrimRenderData boxPrims[MAX_SDF_COUNT];
SDFPrimRenderData torusPrims[MAX_SDF_COUNT];
SDFMaterial material[MAX_SDF_COUNT];
float time;
float height = .1;
float anim = 2;
int materialCount;
};