Heheheh - well, not as "real" as you may hope ;-)
I got the impression that you are way beyond me when it comes to actual coding - I'm pretty much still a C guy with only little C++ knowledge. I can hardly follow you guys here when you are talking the wonders of C++ 11
But I managed to compile the Specular Node example with VC++ Express 2012 today as 64 Bit dll, so I'm rather happy.
As far as your question goes:
In Mental Ray, this value is often user setable, since sometimes it's beneficial to be able to select the value depending on what kind of texture you use or what look you want.
Otherwise I think you could take some portion of the "spotsize" (if that concept exists in LW?). Since this gives you a value related to the currently sampled spot.
I read your thread about this and wondered if the internal result from the simplex noise couldn't be used directly for speeds sake.
You want to use the LW "Functions", right?
Couldn't you "bend" those normals with the function curve (sorry, don't know yet how those things work in LW, I just started today to look into this)?
What the functions should do (I guess) is that instead of a linear interpolation between the two maxima - perpendicular to the surface and "laying flat" on the surface - the curve is used.
So if you assume that the extremes stay unchanged and only the values in between are changed (like a photoshop curve with fixed black and white point) you could use a dot product to find a zero to 1 value between the surface normal and your bump vector from the noise. That value would be the input into the function curve. The result of the function curve (not sure how you get that delivered?) would then tell you how much you have to bend the vector up or down, keeping it's (surface local) x and z direction as is.
Hm - does that make any sense? I need to re-learn about those concepts in LW first to know the right syntax ;-)
And I'm not sure if I understood the problem right.
Cheers,
Tom