Parameters


To make use of user defines parameters, you just inline their values into the code.
public float Scale { get; set; }

public string GetCode()
{
    return @"
float " + FunctionName + @"(__global int *p, Single3 input)
{
    float scale = " + Scale.ToString() + @";
    return noise(p, input.x * scale, input.y * scale, input.z * scale);
}
";
}

Last edited Sep 13, 2010 at 3:05 AM by YellPika, version 3

Comments

No comments yet.