mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Improve selected-NPC ring visuals, anchoring, and occlusion behavior
Selection ring rendering has been upgraded to better match WoW-like target feedback and remain readable across complex geometry. Visual updates: - Reworked ring mesh/shader from a simple two-band strip to a unit-disc + radial fragment shaping. - Implemented a thinner outer ring profile. - Added an inward color/alpha gradient that fades from the ring toward the center. Placement/anchoring updates: - Added CharacterRenderer::getInstanceFootZ() to query model foot plane from instance bounds. - Added Application::getRenderFootZForGuid() to resolve per-GUID foot height via live instance mapping. - Updated GameScreen target selection placement to anchor the effect at target foot Z. Ground/surface stability: - In renderSelectionCircle(), added floor clamping against terrain, WMO, and M2 floor probes at target XY. - Raised final placement offset to reduce residual clipping on uneven surfaces. Depth/visibility behavior: - Added polygon offset during ring draw to reduce z-fighting. - Disabled depth testing for the selection effect draw pass (with state restore) so the ring remains visible through terrain/WMO occluders, per requested behavior. State safety: - Restored modified GL state after selection pass (depth test / polygon offset / depth mask / cull). Build validation: - Verified with cmake build target "wowee" after each stage; final build succeeds.
This commit is contained in:
parent
1f7c220fdb
commit
f7372a282d
6 changed files with 90 additions and 17 deletions
|
|
@ -404,6 +404,10 @@ void GameScreen::render(game::GameHandler& gameHandler) {
|
|||
if (target) {
|
||||
targetGLPos = core::coords::canonicalToRender(
|
||||
glm::vec3(target->getX(), target->getY(), target->getZ()));
|
||||
float footZ = 0.0f;
|
||||
if (core::Application::getInstance().getRenderFootZForGuid(target->getGuid(), footZ)) {
|
||||
targetGLPos.z = footZ;
|
||||
}
|
||||
renderer->setTargetPosition(&targetGLPos);
|
||||
|
||||
// Selection circle color: WoW-canonical level-based colors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue