# HdStorm Mesh Wires drawing issue in USD 24.05 on MacOS

**URL:** <https://forum.aousd.org/t/hdstorm-mesh-wires-drawing-issue-in-usd-24-05-on-macos/1523>\
**Category:** Hydra\
**Created:** [May 16, 2024, 10:01pm UTC](https://forum.aousd.org/t/hdstorm-mesh-wires-drawing-issue-in-usd-24-05-on-macos/1523 "2024-05-16T22:01:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keli-Li](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@Keli-Li](https://forum.aousd.org/u/Keli-Li)\
**Post date:** [May 16, 2024, 10:01pm UTC](https://forum.aousd.org/t/hdstorm-mesh-wires-drawing-issue-in-usd-24-05-on-macos/1523/1 "2024-05-16T22:01:07Z")

</div>

Hi, When upgrading from USD 23.11 to USD 24.05, we got a mesh wires drawing issue on MacOS, it seems to be a regression of computing of edge opacity in Storm shader, it caused all edge pixels to be discarded, nothing was drawn under wireframe mode, no such issue on Windows & Linux.

// line 265 “meshWire.glslfx”  
vec4 ApplyEdgeColor(vec4 Cfill, vec4 patchCoord)  
{  
float p = GetEdgeOpacity();  
**if (p \< 0.5) discard;**  
vec4 wireColor = GetWireframeColor();  
// If wireColor is unset (zero), ignore it altogether  
Cfill.rgb = mix(Cfill.rgb, wireColor.rgb, wireColor.a);  
return ApplyFinalEdgeOpacity(Cfill);  
}

Here’s how Edge Opacity is computed, anyone know any changes related to this?

// line 82 “meshWire.glslfx”

// Returns the distance of the current fragment (in viewport pixel units) from  
// the nearest edge.  
float GetMinEdgeDistance()  
{  
// Hide triangle edges by adding edge mask.  
vec3 param = GetEdgeCoord() + GetPrimitiveEdgeMask();  
vec3 edgeDistance = max(vec3(0.0), param / fwidth(param));  
return min(edgeDistance.x,  
min(edgeDistance.y,  
edgeDistance.z));  
}

// Use edge distance to compute a smooth opacity falloff for good looking edges.  
float GetEdgeFalloff(float d) {  
return exp2(-4 \* d \* d);  
}

float GetEdgeOpacity() {  
return GetEdgeFalloff(GetMinEdgeDistance());  
}

Thanks,  
Keli
