42cf5bc1 |
1 | // Created on: 1991-10-07 |
2 | // Created by: NW,JPB,CAL |
3 | // Copyright (c) 1991-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
c357e426 |
17 | #ifndef _Graphic3d_TypeOfShadingModel_HeaderFile |
18 | #define _Graphic3d_TypeOfShadingModel_HeaderFile |
42cf5bc1 |
19 | |
dc89236f |
20 | //! Definition of the color shading model. |
c357e426 |
21 | enum Graphic3d_TypeOfShadingModel |
42cf5bc1 |
22 | { |
dc89236f |
23 | //! Use Shading Model, specified as default for entire Viewer. |
24 | Graphic3d_TOSM_DEFAULT = -1, |
25 | |
26 | //! Unlit Shading (or shadeless), lighting is ignored and facet is fully filled by its material color. |
27 | //! This model is useful for artificial/auxiliary objects, not intended to be lit, |
28 | //! or for objects with pre-calculated lighting information (e.g. captured by camera). |
29 | Graphic3d_TOSM_UNLIT = 0, |
30 | |
31 | //! Flat Shading, calculated per-facet basing on facet normal. |
32 | //! This model is useful for mesh element analysis. |
33 | //! Note that unlike Graphic3d_TOSM_VERTEX/Graphic3d_TOSM_FRAGMENT, |
34 | //! this shading model does NOT require normals to be defined within vertex attributes. |
c357e426 |
35 | Graphic3d_TOSM_FACET, |
dc89236f |
36 | |
37 | //! Gouraud Shading, calculated per-vertex basing on nodal normal, and then color is interpolated across fragments. |
38 | //! This shading model was default within Fixed-Function Pipeline of old OpenGL (and Direct3d); |
39 | //! still can be used as alternative to Graphic3d_TOSM_FRAGMENT for better performance on low-poly (and middle-poly) models |
40 | //! (per-fragment shading is more optimal for considerably high-poly models, since expensive shading is not computed for discarded fragments). |
41 | //! Shading model requires normals to be defined within vertex attributes. |
c357e426 |
42 | Graphic3d_TOSM_VERTEX, |
dc89236f |
43 | |
44 | //! Phong Shading, calculated per-fragment basing on nodal normal, so that normal is interpolated across fragments. |
45 | //! This is a main shading model nowadays, providing the best image quality. |
46 | //! Shading model requires normals to be defined within vertex attributes. |
47 | Graphic3d_TOSM_FRAGMENT, |
48 | |
67312b79 |
49 | //! Metallic-roughness physically based (PBR) illumination system. |
50 | Graphic3d_TOSM_PBR, |
51 | |
52 | //! Same as Graphic3d_TOSM_PBR but using flat per-triangle normal. |
53 | Graphic3d_TOSM_PBR_FACET, |
54 | |
dc89236f |
55 | // obsolete aliases |
56 | Graphic3d_TOSM_NONE = Graphic3d_TOSM_UNLIT, |
57 | V3d_COLOR = Graphic3d_TOSM_NONE, |
58 | V3d_FLAT = Graphic3d_TOSM_FACET, |
59 | V3d_GOURAUD = Graphic3d_TOSM_VERTEX, |
60 | V3d_PHONG = Graphic3d_TOSM_FRAGMENT |
42cf5bc1 |
61 | }; |
62 | |
992ed6b3 |
63 | enum |
64 | { |
65 | //! Auxiliary value defining the overall number of values in enumeration Graphic3d_TypeOfShadingModel |
67312b79 |
66 | Graphic3d_TypeOfShadingModel_NB = Graphic3d_TOSM_PBR_FACET + 1 |
992ed6b3 |
67 | }; |
68 | |
c357e426 |
69 | #endif // _Graphic3d_TypeOfShadingModel_HeaderFile |