mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-27 12:21:11 +00:00
Fix linestrip usage for highlight box
This commit is contained in:
@@ -63,7 +63,8 @@ cbuffer DebugVertexCBuffer REG(b0)
|
||||
row_major float4x4 ModelViewProj;
|
||||
|
||||
float Scale;
|
||||
float3 dummy1;
|
||||
uint LineStrip;
|
||||
float2 dummy1;
|
||||
};
|
||||
|
||||
cbuffer DebugGeometryCBuffer REG(b0)
|
||||
|
||||
@@ -37,6 +37,18 @@ v2f RENDERDOC_DebugVS(uint vertID : SV_VertexID)
|
||||
|
||||
float2 pos = positions[vertID];
|
||||
|
||||
if(LineStrip)
|
||||
{
|
||||
float2 strippositions[] = {
|
||||
float2(0.0f, 0.0f),
|
||||
float2(1.0f, 0.0f),
|
||||
float2(1.0f, -1.0f),
|
||||
float2(0.0f, -1.0f),
|
||||
};
|
||||
|
||||
pos = strippositions[vertID];
|
||||
}
|
||||
|
||||
OUT.pos = float4(Position.xy + pos.xy*TextureResolution.xy*Scale*ScreenAspect.xy, 0, 1)-float4(1.0,-1.0,0,0);
|
||||
OUT.tex.xy = float2(pos.x, -pos.y);
|
||||
return OUT;
|
||||
|
||||
@@ -3273,6 +3273,8 @@ bool D3D11DebugManager::RenderTexture(TextureDisplay cfg, bool blendAlpha)
|
||||
vertexData.TextureResolution.x = 1.0f/vertexData.ScreenAspect.x;
|
||||
vertexData.TextureResolution.y = 1.0f;
|
||||
|
||||
vertexData.LineStrip = 0;
|
||||
|
||||
if(cfg.rangemax <= cfg.rangemin) cfg.rangemax += 0.00001f;
|
||||
|
||||
pixelData.Channels.x = cfg.Red ? 1.0f : 0.0f;
|
||||
@@ -3592,6 +3594,8 @@ void D3D11DebugManager::RenderHighlightBox(float w, float h, float scale)
|
||||
vertCBuffer.TextureResolution.x = xdim;
|
||||
vertCBuffer.TextureResolution.y = ydim;
|
||||
|
||||
vertCBuffer.LineStrip = 1;
|
||||
|
||||
vconst = MakeCBuffer((float *)&vertCBuffer, sizeof(vertCBuffer));
|
||||
|
||||
m_pImmediateContext->HSSetShader(NULL, NULL, 0);
|
||||
@@ -3642,6 +3646,8 @@ void D3D11DebugManager::RenderCheckerboard(Vec3f light, Vec3f dark)
|
||||
|
||||
vertexData.TextureResolution.x = 1.0f;
|
||||
vertexData.TextureResolution.y = 1.0f;
|
||||
|
||||
vertexData.LineStrip = 0;
|
||||
|
||||
FillCBuffer(m_DebugRender.GenericVSCBuffer, (float *)&vertexData, sizeof(DebugVertexCBuffer));
|
||||
|
||||
@@ -4460,6 +4466,8 @@ void D3D11DebugManager::RenderMesh(uint32_t frameID, const vector<uint32_t> &eve
|
||||
{
|
||||
DebugVertexCBuffer vertexData;
|
||||
|
||||
vertexData.LineStrip = 0;
|
||||
|
||||
D3D11PipelineState pipeState = m_WrappedDevice->GetReplay()->GetD3D11PipelineState();
|
||||
D3D11RenderState *curRS = m_WrappedDevice->GetImmediateContext()->GetCurrentPipelineState();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user