How to control grass height/scale based on Landscape Layer weight

I have a landscape material with a GrassLayer that generates grass and a DirtLayer that doesn’t. I want to control the scale of the grass in the Landscape Grass Type to correspond to the weight of the GrassLayer where it spawns, so that in full 100% GrassLayer, the generated grass is full and tall, and towards the edges, where the GrassLayer and DirtLayer softly blend, the generated grass becomes smaller or shorter. Is there a way to do this?

In case someone needs it, I found a great guide for this:

My custom grass is made very specifically.
In a pinch, the blades grow or shorten based on the value of the grass sample layer.
Provided it supports alpha and isnt just a solid color, the grass can grow or shorten using WPO.
Much like the video.

To get a realistic effect you do need to mix up several grass layers thouugh, which isnt exactly possible using landscape grass (or wqs moved away from that because landscape perfomance sucks).

Procedural foliage is the way to go…