SamplerName.sample(float cursor) Samples the curve at coordinate cursor on the horizontal axis.The return type is a float vector whose dimension matches the curve dimension. A 1D curve will return a float, 3D curve will return a float3, etc…
SamplerName.sampleCDF(float cursor) Treats the curve as a Probability Density Function (PDF), and samples its Cumulative Density Function (CDF) at coordinate cursor on the horizontal axis.Only works for float curves (single channel / 1D). Useful to get custom random distributions by doing Curve.sampleCDF(rand(0,1))
SamplerName.derive(float cursor) Computes the derivative of the curve sampler curve at coordinate cursor on the horizontal axis.Return type is a float vector whose dimension matches the curve dimension. Each xyzw element of the result will contain the derivative of each of the separate curve components.
SamplerName.integrate(float cursorBegin, float cursorEnd) Computes the integral of the curve sampler curve between coordinates cursorBegin and cursorEnd on the horizontal axis.Return type is a float vector whose dimension matches the curve dimension. Each xyzw element of the result will contain the integral of each of the separate curve components.
Disclaimer: These are describing the reference implementation. When using attribute samplers, the behavior of these functions can vary depending on the implementation in the game-engine where the effect is loaded.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.