I can't figure out how to script a simple inverse square root function node like the math node. The OSL language spec is mostly over my head since I don't have any programming experience.

  • 1
    $\begingroup$ Inverse square root - isn't that just a square? $\endgroup$
    – PGmath
    Commented Jul 27, 2017 at 4:00
  • $\begingroup$ @PGmath - probably just means 1/√X $\endgroup$
    – bertmoog
    Commented Jul 27, 2017 at 4:41

1 Answer 1


Never mind, looked at it again the next day and it was rather obvious.. just needed a break apparently

shader invrsquareroot(
    float x = 10.0,

    output float result = 0)
    result = inversesqrt(x);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .