[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5.1 Mathematics

float radians ( float degrees )

float degrees ( float radians )
float sin ( float radians )
float asin ( float a )
float cos ( float radians )
float acos ( float a )
float tan ( float radians )
float atan ( float a )

float pow ( float x, y )
float exp ( float x )
float sqrt ( float x )
float inversesqrt ( float x )
float log ( float x [, base] )
float mod ( float x, y )
float abs ( float x )
float sign ( float x )
float floor ( float x )
float ceil ( float x )
float round ( float x )

type min ( type x, y )
type max ( type x, y )
type clamp ( type x, min, max )

float step ( float min, value )
float smoothstep ( float min, max, value )

type mix ( type x, y, alpha )
Returns x*(1-alpha) + y*alpha. For multi-component types (color, point, ...), the operation is performed for each component.

float filteredstep ( float edge, value, ... )
float filteredstep ( float edge, value1, value2, ... )
Simliar to step() but the return value is filtered over the area of the micro-polygon being shaded. Useful for shader anti-aliasing. Filtering kernel is selected using the "filter" optional parameter. Recognized filters are "gaussian", "box", "triangle" and "catmull-rom". Default is "catmull-rom". If two values are provided, return value is filtered in the range [value1..value2].

type Du ( type x )
type Dv ( type x )
type Deriv ( type num; float denom )
Du() and Dv() compute the parametric derivative of the given expressions with respect to the u and the v parameters of the underlying surface (17).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Aghiles Kheffache on July, 31 2003 using texi2html
3Delight 1.0.0. Copyright 2000-2003 The 3Delight Team. All Rights Reserved.