mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Change text rendering back to instanced triangle strips
This commit is contained in:
@@ -71,17 +71,13 @@ layout (location = 1) out vec2 OUTglyphuv;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
// VKTODOMED temporarily drawing lists
|
||||
const vec3 verts[6] = vec3[6](vec3( 0.0, 0.0, 0.5),
|
||||
vec3( 1.0, 0.0, 0.5),
|
||||
vec3( 0.0, 1.0, 0.5),
|
||||
|
||||
const vec3 verts[4] = vec3[4](vec3( 0.0, 0.0, 0.5),
|
||||
vec3( 1.0, 0.0, 0.5),
|
||||
vec3( 0.0, 1.0, 0.5),
|
||||
vec3( 1.0, 1.0, 0.5));
|
||||
|
||||
vec3 pos = verts[gl_VertexID%6];
|
||||
uint strindex = (gl_VertexID/6);
|
||||
vec3 pos = verts[gl_VertexID%4];
|
||||
uint strindex = gl_InstanceID;
|
||||
|
||||
vec2 charPos = vec2(strindex + pos.x + general.TextPosition.x, pos.y + general.TextPosition.y);
|
||||
|
||||
|
||||
@@ -658,7 +658,7 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver, VkDevice dev)
|
||||
|
||||
GetResourceManager()->WrapResource(Unwrap(dev), m_TexDisplayBlendPipeline);
|
||||
|
||||
ia.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
ia.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
|
||||
|
||||
stages[0].shader = Unwrap(shader[TEXTVS]);
|
||||
stages[1].shader = Unwrap(shader[TEXTFS]);
|
||||
@@ -1296,9 +1296,7 @@ void VulkanDebugManager::RenderTextInternal(const TextPrintState &textstate, flo
|
||||
|
||||
vt->CmdBindDescriptorSets(Unwrap(textstate.cmd), VK_PIPELINE_BIND_POINT_GRAPHICS, Unwrap(m_TextPipeLayout), 0, 1, UnwrapPtr(m_TextDescSet), 2, offsets);
|
||||
|
||||
// VKTODOMED strip + instance ID doesn't seem to work atm? instance ID comes through 0
|
||||
// for now, do lists, but want to change back
|
||||
vt->CmdDraw(Unwrap(textstate.cmd), 6*(uint32_t)strlen(text), 1, 0, 0);
|
||||
vt->CmdDraw(Unwrap(textstate.cmd), 4, (uint32_t)strlen(text), 0, 0);
|
||||
}
|
||||
|
||||
void VulkanDebugManager::EndText(const TextPrintState &textstate)
|
||||
|
||||
Reference in New Issue
Block a user