/
stud_22-365
/
GLXEngine
Обзор
Документация
Войти
/
stud_22-365
/
GLXEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/Demos/materials/multitexture/MultiTextureD.dpr
35 строк
1 KB
glscene
HappyNewYear!
28 дек 2025, 23:42
28 дек 2025, 23:42
5ab1194
Код
Авторство
О чём код?
{: This sample mixes two textures by using multitexturing. Multitexturing requires at least two materials in the material library:<ul> <li>a base material: determines the basic properties, incl. blending, colors and lighting-related properties <li>a second material: determines the second texture (color and other properties are ignored) </ul> This structure allows reuse of second textures among a variety of materials, this is particularly usefull for details maps, which are usually just "noise" to be applied on different base textures. You can also use it to reuse a basic standard lighting map throughout many objects, thus reducing texture memory needs (many shadows can be derived from a few deformed basic maps). The texture matrix (scale, offset) are adjusted independantly for the two textures, in this sample, the TrackBar adjusts an isotropic scaling. When multi-texturing, never forget that both texture modes (decal, modulate etc.) are honoured. For instance, if you "Decal" a non-transparent second texture, the base texture will be completely replaced! } program MultiTextureD; uses Forms, fdMultiTexture in 'fdMultiTexture.pas' {FormMultiTexture}; {$R *.RES} begin Application.Initialize; Application.CreateForm(TFormMultiTexture, FormMultiTexture); Application.Run; end.