feat: add RenderDoc integration for D3D12 frame capture
- Add mvs/RenderDoc project with sphere rendering + RenderDoc capture - Dynamic loading of renderdoc.dll without header dependencies - Auto-capture frames 5-6 to .rdc file - Copy sphere test resources (shaders, textures) via CMake
This commit is contained in:
32
MVS/RenderDoc/Res/Shader/sphere.hlsl
Normal file
32
MVS/RenderDoc/Res/Shader/sphere.hlsl
Normal file
@@ -0,0 +1,32 @@
|
||||
struct Vertex {
|
||||
float4 pos : POSITION;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VSOut {
|
||||
float4 pos : SV_POSITION;
|
||||
float4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
Texture2D gDiffuseTexture : register(t0);
|
||||
SamplerState gSampler : register(s0);
|
||||
|
||||
cbuffer MatrixBuffer : register(b0) {
|
||||
float4x4 gProjectionMatrix;
|
||||
float4x4 gViewMatrix;
|
||||
float4x4 gModelMatrix;
|
||||
float4x4 gIT_ModelMatrix;
|
||||
};
|
||||
|
||||
VSOut MainVS(Vertex v) {
|
||||
VSOut o;
|
||||
float4 positionWS = mul(gModelMatrix, v.pos);
|
||||
float4 positionVS = mul(gViewMatrix, positionWS);
|
||||
o.pos = mul(gProjectionMatrix, positionVS);
|
||||
o.texcoord = v.texcoord;
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 MainPS(VSOut i) : SV_TARGET {
|
||||
return gDiffuseTexture.Sample(gSampler, float2(i.texcoord.x, i.texcoord.y));
|
||||
}
|
||||
Reference in New Issue
Block a user