mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-12 17:51:02 +00:00
Fix issue showing whole pass in mesh viewer with inverse view height
* In particular this was breaking if not all draws in the pass used an inverse view (unlikely in practice, but comes up in our tests).
This commit is contained in:
@@ -39,7 +39,8 @@ BINDING(0) uniform MeshUBOData
|
||||
uint homogenousInput;
|
||||
vec2 pointSpriteSize;
|
||||
uint rawoutput;
|
||||
vec3 padding;
|
||||
uint flipY;
|
||||
vec2 padding;
|
||||
}
|
||||
INST_NAME(Mesh);
|
||||
|
||||
|
||||
@@ -67,6 +67,10 @@ void main(void)
|
||||
#ifdef VULKAN
|
||||
// GL->VK conventions
|
||||
gl_Position.y = -gl_Position.y;
|
||||
if(Mesh.flipY == 1)
|
||||
{
|
||||
gl_Position.y = -gl_Position.y;
|
||||
}
|
||||
if(Mesh.rawoutput == 0)
|
||||
{
|
||||
gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0;
|
||||
|
||||
@@ -2315,7 +2315,8 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
|
||||
data->pointSpriteSize = Vec2f(0.0f, 0.0f);
|
||||
data->displayFormat = 0;
|
||||
data->rawoutput = 1;
|
||||
data->padding = Vec3f();
|
||||
data->flipY = 0;
|
||||
data->padding = Vec2f();
|
||||
m_MeshRender.UBO.Unmap();
|
||||
|
||||
uint32_t viewOffs = 0;
|
||||
|
||||
@@ -528,6 +528,7 @@ void VulkanReplay::RenderMesh(uint32_t eventId, const rdcarray<MeshFormat> &seco
|
||||
data->pointSpriteSize = Vec2f(0.0f, 0.0f);
|
||||
data->displayFormat = MESHDISPLAY_SOLID;
|
||||
data->rawoutput = 0;
|
||||
data->flipY = (cfg.position.flipY == fmt.flipY) ? 0 : 1;
|
||||
|
||||
m_MeshRender.UBO.Unmap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user