Added some native functions/types and wrappers.
Fixed regression from 3f8df7a5373caac0816f6bb21ad5fd64af677ab9 (uninitialized shader variable)
Added convergence threshold variable in Sample.