FMX.Materials.TLightMaterial.Ambient

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Ambient: TAlphaColor read FAmbient write FAmbient;

C++

__property System::Uitypes::TAlphaColor Ambient = {read=FAmbient, write=FAmbient, nodefault};

Properties

Type Visibility Source Unit Parent
property public
FMX.Materials.pas
FMX.Materials.hpp
FMX.Materials TLightMaterial

Description

Specifies the color of this material object that is reflected when the object is illuminated by an ambient light rather than a direct light source.

The ambient color is meant to provide a base color to surfaces so that they can be seen. Use Ambient to set or get the ambient color of the current TLightMaterial. With no light, Ambient has no effect. The surface of the object is colored fairly uniformly in that color. With any directional light everything looks flat. With point or spot lights, the color attenuates with distance.

In the following image, the cone and the cube are linked to the same TLightMaterial, with Diffuse set to red, Ambient set to blue, and the rest of the color properties set to null (Emissive, Specular).

TLightMaterial Diffuse and Ambient.png

See Also