Procedural texturing: Difference between revisions

Jump to navigation Jump to search
→‎The agriculture effect: missing "<" in one of the code snippets
m (→‎The dirt runway effect: begin adding syntax highlighting (generally missing))
(→‎The agriculture effect: missing "<" in one of the code snippets)
Line 345: Line 345:
De-tiling can also be achieved by rotating the texture coordinates inside patches. This is controlled by a rotation flag which can be set to 1 (random rotation) or 2 (rotation by multiples of 90 degrees only) in addition to a rotation scale. In case of very regular textures which should be rotated by multiples of 90 degrees only, uv texture coordinate offsets are provided to align texture and rotated domain.
De-tiling can also be achieved by rotating the texture coordinates inside patches. This is controlled by a rotation flag which can be set to 1 (random rotation) or 2 (rotation by multiples of 90 degrees only) in addition to a rotation scale. In case of very regular textures which should be rotated by multiples of 90 degrees only, uv texture coordinate offsets are provided to align texture and rotated domain.


   <rotation_flag>1/rotation_flag>
   <rotation_flag>1</rotation_flag>
   <rotation_scale>2000.0</rotation_scale>
   <rotation_scale>2000.0</rotation_scale>
   <uv_xoffset>0.0</uv_xoffset>
   <uv_xoffset>0.0</uv_xoffset>
Line 355: Line 355:


Both rotation and overlay can be combined. Neither of the effects is compatible with patterns of random trees of buildings created by placement masks, as these are used at tile loading time and can not be changed runtime like shader effects.
Both rotation and overlay can be combined. Neither of the effects is compatible with patterns of random trees of buildings created by placement masks, as these are used at tile loading time and can not be changed runtime like shader effects.


=== The rock effect ===
=== The rock effect ===
242

edits

Navigation menu