Description

The root of this issue is that FLocalVertexFactory is doing manual vertex fetch in the shader. In HLSL, this relies on SV_VertexId. In GLSL, it's gl_VertexId. HLSL does not include the base vertex index and SV_VertexId always starts at zero. GLSL, on the other hand, does include the base vertex index.

As a result, this works correctly in OpenGL / Vulkan, and incorrectly on DirectX.

Steps to Reproduce

Run attached project and notice the four triangles in the upper left corner. All four triangles should have unique vertex colors; instead, the second column of triangles mirrors the first. This is because the second column of triangles is using a BaseVertexIndex != 0.[Link Removed]

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-74848 in the post.

0
Login to Vote

Fixed
ComponentUE - Rendering Architecture - RHI
Affects Versions4.22
Target Fix4.23
Fix Commit6597932
Main Commit6944849
Release Commit6955818
CreatedMay 20, 2019
ResolvedMay 21, 2019
UpdatedJul 30, 2019
View Jira Issue