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
1.0.0:default-material [2023/04/17 08:54] – [Adding new Textures at DesignTime] admin1.0.0:default-material [2023/04/17 08:59] (current) – [Adding new Textures at DesignTime] admin
Line 1474: Line 1474:
  
 Move inside the object inspector to the specific material source (inherited from TGorillaDefaultMaterialSource). Move inside the object inspector to the specific material source (inherited from TGorillaDefaultMaterialSource).
-The open the design editor of the "**Bitmaps**" property. Then simply add a new item and input a name for the texture. 
  
-The name will be important to access the texture in your shader.+__Steps:__ 
 +  * Open the design editor of the "**Bitmaps**" property 
 +  * Add a new item 
 +  * Input a name for the texture 
 +  * Choose where the texture will be available: PixelShader or VertexShader 
 + 
 +__//NOTICE://__ The name will be important to access the texture in your shader!
  
 Due to Firemonkey implementation, you will access your texture with the **prefix "_"**. So for example, if you name your texture "**MyTexture**", you will Due to Firemonkey implementation, you will access your texture with the **prefix "_"**. So for example, if you name your texture "**MyTexture**", you will
 access it by "**_MyTexture**". access it by "**_MyTexture**".
 +
 +When you choose the shader your texture will be available, you can access it also at design time in the corresponding property:
 +
 +^ShaderKind^Property^
 +|PixelShader|<TGorillaDefaultMaterialSource>.SurfaceShader|
 +|VertexShader|<TGorillaDefaultMaterialSource>.VertexShader|
 +
  
 In the collection item you can configure further properties of your texture and you can of course load the image data itself. In the collection item you can configure further properties of your texture and you can of course load the image data itself.
Line 1486: Line 1498:
  
 __//WARNING//__: When adding new texture always add them at the end of the collection, to not intercept default textures. __//WARNING//__: When adding new texture always add them at the end of the collection, to not intercept default textures.
 +
 +=== Availabled Properties ===
  
 ^Property^Descr^ ^Property^Descr^