| 1 |
/* |
| 2 |
* Copyright 2013 Google Inc. |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
#ifndef SkPerlinNoiseShaderType_DEFINED |
| 8 |
#define SkPerlinNoiseShaderType_DEFINED |
| 9 |
|
| 10 |
/** |
| 11 |
* About the noise types : the difference between the first two is just minor tweaks to the |
| 12 |
* algorithm; they're not two entirely different noises. The output looks different, but once the |
| 13 |
* noise is generated in the [1, -1] range, the output is brought back in the [0, 1] range by doing: |
| 14 |
* kFractalNoise : noise * 0.5 + 0.5 |
| 15 |
* kTurbulence : abs(noise) |
| 16 |
* Very little differs between the two types, although you can tell the difference visually. |
| 17 |
*/ |
| 18 |
enum class SkPerlinNoiseShaderType { kFractalNoise, kTurbulence, kLast = kTurbulence }; |
| 19 |
|
| 20 |
#endif |