| 1 |
/* |
| 2 |
Copyright 2020-2020 Michalis Kamburelis. |
| 3 |
|
| 4 |
This file is part of "Castle Game Engine". |
| 5 |
|
| 6 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 7 |
included in this distribution, for details about the copyright. |
| 8 |
|
| 9 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 |
|
| 13 |
---------------------------------------------------------------------------- |
| 14 |
|
| 15 |
Structures for Phong lighting model. |
| 16 |
They are included in a special way, to make GLSL code compile both with and without |
| 17 |
"separate compilation units". |
| 18 |
*/ |
| 19 |
|
| 20 |
struct MaterialInfo |
| 21 |
{ |
| 22 |
/* Calculated color from |
| 23 |
Material.diffuseColor/transparency (or ColorRGBA node) * diffuse texture. |
| 24 |
Contains complete "diffuse/transparency" information that is independent of light source. |
| 25 |
In case of Gouraud shading it is not multiplied by the diffuse texture |
| 26 |
(because it cannot be, as we're on vertex shader). */ |
| 27 |
vec4 diffuse_alpha; |
| 28 |
|
| 29 |
vec3 ambient; |
| 30 |
vec3 specular; |
| 31 |
float shininess; |
| 32 |
}; |