src/scene/glsl/source/lighting_model_unlit/shading_phong.fs
raw| 1 | uniform vec4 castle_MaterialEmissiveAlpha; |
| 2 | |
| 3 | void calculate_lighting(out vec4 result, const in vec4 vertex_eye, const in vec3 normal_eye) |
| 4 | { |
| 5 | /* In case of UnlitMaterial, Color/ColorRGBA replaces emissive color.*/ |
| 6 | result = castle_apply_color_per_vertex(castle_MaterialEmissiveAlpha); |
| 7 | |
| 8 | /* In case of UnlitMaterial, main texture (emissiveTexture or Appearance.texture) |
| 9 | is mixed with emissive color. */ |
| 10 | main_texture_apply(result, normal_eye); |
| 11 | } |