Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
0.8.4:rimlighting-material [2022/06/15 20:30] – [What is a rim light?] admin0.8.4:rimlighting-material [2022/06/17 10:37] (current) – [RimLighting Material (TGorillaRimLightingMaterialSource)] admin
Line 3: Line 3:
 The rim lighting material **TGorillaRimLightingMaterialSource** is inherited from the TGorillaDefaultMaterialSource and supports multiple lights and many more features. The rim lighting material **TGorillaRimLightingMaterialSource** is inherited from the TGorillaDefaultMaterialSource and supports multiple lights and many more features.
  
-{{:0.8.4:rimlighting.jpg?400|}}+{{:0.8.4:rimlighting.jpg|}}
  
 ===== What is a rim light? ===== ===== What is a rim light? =====
Line 20: Line 20:
 |RimColor|Define the color of the rim light rendered.| |RimColor|Define the color of the rim light rendered.|
  
 +===== Example =====
 +
 +<file pascal>
 +uses
 +  Gorilla.Material.RimLighting;
 +  
 +[...]
 +
 +var FRimLightMaterial : TGorillaRimLightingMaterialSource;
 +
 +FRimLightMaterial := TGorillaRimLightingMaterialSource.Create(GorillaViewport1);
 +FRimLightMaterial.Parent := GorillaViewport1;
 +
 +/// load the diffuse color texture as usual.
 +FRimLightMaterial.Texture.LoadFromFile('wood.png');
 +
 +/// configure rim lighting intensity
 +FRimLightMaterial.Rim := 0.1;
 +
 +/// defining the color of rim lighting
 +FRimLightMaterial.RimColor := TAlphaColorRec.White;
 +</file>