Debian Codegraph @

src/scene/glsl/generated-pascal/lighting_model_physical_shading_gouraud.vs.inc

raw
1 { -*- buffer-read-only: t -*- }
2 { DON'T EDIT -- this file was automatically generated from "source/lighting_model_physical/shading_gouraud.vs" }
3 '/*' + LineEnding +
4 ' Copyright 2020-2020 Michalis Kamburelis and glTF-Sample-Viewer authors.' + LineEnding +
5 '' + LineEnding +
6 ' This file is part of "Castle Game Engine".' + LineEnding +
7 '' + LineEnding +
8 ' "Castle Game Engine" is free software; see the file COPYING.txt,' + LineEnding +
9 ' included in this distribution, for details about the copyright.' + LineEnding +
10 '' + LineEnding +
11 ' "Castle Game Engine" is distributed in the hope that it will be useful,' + LineEnding +
12 ' but WITHOUT ANY WARRANTY; without even the implied warranty of' + LineEnding +
13 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.' + LineEnding +
14 '' + LineEnding +
15 ' ----------------------------------------------------------------------------' + LineEnding +
16 '' + LineEnding +
17 ' Calculate Physical (PBR) lighting model, in Gouraud shading. */' + LineEnding +
18 '' + LineEnding +
19 'uniform vec4 castle_MaterialBaseAlpha;' + LineEnding +
20 'uniform vec3 castle_EmissiveColor;' + LineEnding +
21 '' + LineEnding +
22 'void calculate_lighting(out vec4 result, const in vec4 vertex_eye, const in vec3 normal_eye)' + LineEnding +
23 '{' + LineEnding +
24 ' vec4 material_base_alpha;' + LineEnding +
25 '' + LineEnding +
26 ' material_base_alpha = castle_apply_color_per_vertex(castle_MaterialBaseAlpha);' + LineEnding +
27 '' + LineEnding +
28 ' result = vec4(castle_EmissiveColor, material_base_alpha.a);' + LineEnding +
29 '' + LineEnding +
30 ' "This GLSL code should never be used, since PhysicalMaterial requires Phong shading.' + LineEnding +
31 ' Uncommented, to break compilation in case this is accidentally used."' + LineEnding +
32 '' + LineEnding +
33 ' /* Clamp sum of lights colors to be <= 1. See template_phong.fs for comments. */' + LineEnding +
34 ' result.rgb = min(result.rgb, 1.0);' + LineEnding +
35 '}' + LineEnding +
36 ''