Add light shape wireframe display in viewport
Draw a type-appropriate wireframe gizmo for every UsdLux light in the stage, mirroring the existing camera-wireframe overlay (dedicated VAO/VBO reusing the bbox shader, drawn on top with depth-test off). Shapes, built in the light's local space and pushed through its local-to-world transform: - SphereLight 3 orthogonal circles (radius); axis-cross when treatAsPoint - RectLight width x height rectangle + emission direction line - DiskLight circle + direction line - CylinderLight two end-cap circles + connectors (radius/length) - DistantLight sun disc + parallel rays - DomeLight 3 large display-scaled circles Selected lights draw accent orange, others warm yellow. Verified by creating a SphereLight (3-circle sphere) and a RectLight (rectangle) in-app: distinct shapes, correct selected/deselected colours, gizmos visible over geometry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1104,6 +1104,9 @@ void ViewportTile::Render(int tileIndex, ImVec2 pos, ImVec2 size,
|
||||
m_stage, m_selectedSdfPaths,
|
||||
m_camera.GetUsdCameraPath(),
|
||||
viewProj, m_camera.GetDist());
|
||||
m_renderer.DrawLightWireframes(
|
||||
m_stage, m_selectedSdfPaths,
|
||||
viewProj, m_camera.GetDist());
|
||||
}
|
||||
|
||||
// Display FBO texture (flip UV Y: OpenGL is bottom-up)
|
||||
|
||||
Reference in New Issue
Block a user