mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Add test that solid/lit rendering works on points and lines
This commit is contained in:
@@ -178,6 +178,12 @@ float4 main(v2f IN) : SV_Target0
|
||||
|
||||
ctx->Draw(4, 6);
|
||||
|
||||
setMarker("Lines");
|
||||
|
||||
ctx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
|
||||
|
||||
ctx->Draw(4, 6);
|
||||
|
||||
setMarker("Stride 0");
|
||||
IASetVertexBuffer(vb, 0, 0);
|
||||
|
||||
|
||||
@@ -191,6 +191,12 @@ float4 main(v2f IN) : SV_Target0
|
||||
|
||||
cmd->DrawInstanced(4, 1, 6, 0);
|
||||
|
||||
setMarker(cmd, "Lines");
|
||||
|
||||
cmd->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_LINELIST);
|
||||
|
||||
cmd->DrawInstanced(4, 1, 6, 0);
|
||||
|
||||
setMarker(cmd, "Stride 0");
|
||||
|
||||
IASetVertexBuffer(cmd, vb, 0, 0);
|
||||
|
||||
@@ -291,6 +291,10 @@ void main()
|
||||
|
||||
glDrawArrays(GL_POINTS, 6, 4);
|
||||
|
||||
setMarker("Lines");
|
||||
|
||||
glDrawArrays(GL_LINES, 6, 4);
|
||||
|
||||
setMarker("Stride 0");
|
||||
|
||||
glBindVertexArray(stride0vao);
|
||||
|
||||
@@ -215,6 +215,10 @@ void main()
|
||||
|
||||
VkPipeline pointspipe = createGraphicsPipeline(pipeCreateInfo);
|
||||
|
||||
pipeCreateInfo.inputAssemblyState.topology = VK_PRIMITIVE_TOPOLOGY_LINE_LIST;
|
||||
|
||||
VkPipeline linespipe = createGraphicsPipeline(pipeCreateInfo);
|
||||
|
||||
pipeCreateInfo.vertexInputState.vertexBindingDescriptions = {{0, 0, VK_VERTEX_INPUT_RATE_VERTEX}};
|
||||
|
||||
pipeCreateInfo.layout = layout2;
|
||||
@@ -294,6 +298,12 @@ void main()
|
||||
|
||||
vkCmdDraw(cmd, 4, 1, 6, 0);
|
||||
|
||||
setMarker(cmd, "Lines");
|
||||
|
||||
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, linespipe);
|
||||
|
||||
vkCmdDraw(cmd, 4, 1, 6, 0);
|
||||
|
||||
setMarker(cmd, "Stride 0");
|
||||
|
||||
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, stride0pipe);
|
||||
|
||||
@@ -369,6 +369,23 @@ class Mesh_Zoo():
|
||||
|
||||
rdtest.log.success("Point picking is as expected")
|
||||
|
||||
self.cfg.highlightVert = rd.MeshDisplay.NoHighlight
|
||||
self.cfg.solidShadeMode = rd.SolidShade.Solid
|
||||
|
||||
self.cache_output()
|
||||
self.cfg.solidShadeMode = rd.SolidShade.Lit
|
||||
self.cache_output()
|
||||
|
||||
rdtest.log.success("Point solid and lit rendering works as expected")
|
||||
|
||||
self.controller.SetFrameEvent(self.find_action("Lines").next.eventId, False)
|
||||
|
||||
self.cache_output()
|
||||
self.cfg.solidShadeMode = rd.SolidShade.Lit
|
||||
self.cache_output()
|
||||
|
||||
rdtest.log.success("Lines solid and lit rendering works as expected")
|
||||
|
||||
self.controller.SetFrameEvent(self.find_action("Stride 0").next.eventId, False)
|
||||
|
||||
self.cfg.position = self.controller.GetPostVSData(0, 0, self.cfg.type)
|
||||
|
||||
Reference in New Issue
Block a user