TMyMaterial = class (TMaterial) private protected _FMatrixMVP: TShaderVarMatrix; _FMatrixMV: TShaderVarMatrix; _TIMatrixMV: TShaderVarMatrix; _EyePos: TShaderVarVector; _Opacity: TShaderVarFloat; _EmisColor: TShaderVarColor; _AmbiColor: TShaderVarColor; _DiffColor: TShaderVarColor; _SpecColor: TShaderVarColor; _SpecShiny: TShaderVarFloat; _Lights: TShaderVarLights; _Texture: TShaderVarTexture; _ShaderV: TShaderSourceV; _ShaderP: TShaderSourceP; ///// Method procedure DoInitialize; override; procedure DoApply (const Context_: TContext3D); override; public constructor Create; override; destructor Destroy; override; ///// Property property EmisColor: TShaderVarColor read _EmisColor; property AmbiColor: TShaderVarColor read _AmbiColor; property DiffColor: TShaderVarColor read _DiffColor; property SpecColor: TShaderVarColor read _SpecColor; property SpecShiny: TShaderVarFloat read _SpecShiny; property Texture: TShaderVarTexture read _Texture; end;
TMyMaterialSource is the component that puts the textures on top of the 3D components. MyMaterial library is available for Delphi 10 Berlin with FireMonkey and it looks to be open source. Demos are available for you to test its features. For those developers who want to study the source code, it is available on Github. With MyMaterial libray you can easily create your own custom textures and effects and apply them to the components you create.