66 * PROGRAMMER: Peter Geinitz (Wayfarer)
77 */
88
9+ using System . Runtime . CompilerServices ;
10+
911namespace Imaging . Texture
1012{
1113 /// <summary>
@@ -103,6 +105,50 @@ public static TextureConfig GetPlasmaArcConfig()
103105 } ;
104106 }
105107
108+ /// <summary>
109+ /// Gets the furrowed tree bark configuration.
110+ /// </summary>
111+ /// <returns>The tree bark configuration.</returns>
112+ public static TextureConfig GetTreeBarkConfig ( )
113+ {
114+ return new TextureConfig
115+ {
116+ TurbulenceSize = 16.0 , // Maps to horizontal frequency scale
117+ WarpStrength = 12.0 , // Grain twisting displacement power
118+ CenterRgb = [ 140 , 95 , 55 ] , // Bright ridge wood highlight color
119+ EdgeRgb = [ 75 , 45 , 25 ] // Dark deep furrow crease color
120+ } ;
121+ }
122+
123+ /// <summary>
124+ /// Gets the leaf foliage configuration.
125+ /// </summary>
126+ /// <returns>The leaf foliage configuration.</returns>
127+ public static TextureConfig GetFoliageConfig ( )
128+ {
129+ return new TextureConfig
130+ {
131+ CellSize = 40 ,
132+ CenterRgb = [ 34 , 110 , 24 ] , // Primary outer leaf green color
133+ EdgeRgb = [ 12 , 35 , 10 ] // Deep background ambient shadow drop color
134+ } ;
135+ }
136+
137+ /// <summary>
138+ /// Gets the wooden plank board configuration.
139+ /// </summary>
140+ /// <returns>The wooden plank board configuration.</returns>
141+ public static TextureConfig GetWoodPlankConfig ( )
142+ {
143+ return new TextureConfig
144+ {
145+ TurbulenceSize = 32.0 ,
146+ WarpStrength = 0.15 , // Reusing WarpStrength for internal Engine TurbulencePower
147+ CenterRgb = [ 130 , 85 , 45 ] , // Base board brown
148+ EdgeRgb = [ 70 , 40 , 20 ] // Dark grain accent lines
149+ } ;
150+ }
151+
106152 // --- GENERATORS ---
107153
108154 /// <summary>
@@ -211,5 +257,73 @@ public static RawTextureBuffer GeneratePlasmaArc(int width, int height, object n
211257 width , height , noiseGen , config . RgbRamp ,
212258 config . TurbulenceSize , config . Octaves , config . Persistence , 255 ) ;
213259 }
260+
261+ /// <summary>
262+ /// Generates the furrowed organic tree bark.
263+ /// </summary>
264+ /// <param name="width">The width.</param>
265+ /// <param name="height">The height.</param>
266+ /// <param name="noiseGen">The noise gen instance wrapper.</param>
267+ /// <returns>The generated raw texture buffer containing tree bark.</returns>
268+ public static RawTextureBuffer GenerateTreeBark ( int width , int height , object noiseGen )
269+ {
270+ var config = GetTreeBarkConfig ( ) ;
271+
272+ return TextureMathEngine . GenerateTreeBark (
273+ width ,
274+ height ,
275+ noiseGen ,
276+ 255 ,
277+ config . TurbulenceSize ,
278+ 70.0 , // Stretched macro Y-scaling baseline footprint
279+ config . WarpStrength ,
280+ config . EdgeRgb [ 0 ] , config . EdgeRgb [ 1 ] , config . EdgeRgb [ 2 ] ,
281+ config . CenterRgb [ 0 ] , config . CenterRgb [ 1 ] , config . CenterRgb [ 2 ]
282+ ) ;
283+ }
284+
285+ /// <summary>
286+ /// Generates the interlocking leaf foliage canopy.
287+ /// </summary>
288+ /// <param name="width">The width.</param>
289+ /// <param name="height">The height.</param>
290+ /// <returns>The generated raw texture buffer containing leaf foliage.</returns>
291+ public static RawTextureBuffer GenerateFoliage ( int width , int height )
292+ {
293+ var config = GetFoliageConfig ( ) ;
294+
295+ return TextureMathEngine . GenerateFoliage (
296+ width ,
297+ height ,
298+ config . CellSize ,
299+ 255 ,
300+ config . CenterRgb [ 0 ] , config . CenterRgb [ 1 ] , config . CenterRgb [ 2 ] ,
301+ config . EdgeRgb [ 0 ] , config . EdgeRgb [ 1 ] , config . EdgeRgb [ 2 ]
302+ ) ;
303+ }
304+
305+ /// <summary>
306+ /// Generates a longitudinal sawn wood board texture.
307+ /// </summary>
308+ /// <param name="width">The width.</param>
309+ /// <param name="height">The height.</param>
310+ /// <param name="noiseGen">The noise gen instance wrapper.</param>
311+ /// <returns>The generated raw texture buffer containing a wood plank.</returns>
312+ public static RawTextureBuffer GenerateWoodPlank ( int width , int height , object noiseGen )
313+ {
314+ var config = GetWoodPlankConfig ( ) ;
315+
316+ return TextureMathEngine . GenerateWoodPlank (
317+ width ,
318+ height ,
319+ noiseGen ,
320+ 255 ,
321+ 6.0 ,
322+ config . WarpStrength ,
323+ config . TurbulenceSize ,
324+ config . CenterRgb [ 0 ] , config . CenterRgb [ 1 ] , config . CenterRgb [ 2 ] ,
325+ config . EdgeRgb [ 0 ] , config . EdgeRgb [ 1 ] , config . EdgeRgb [ 2 ]
326+ ) ;
327+ }
214328 }
215- }
329+ }
0 commit comments