Lean Texture+


DOCUMENTATION

What is Lean Texture+?

Lean Texture+ is an extension to the Lean Texture asset, adding many new texture filters.

Before using Lean Texture+ I recommend you read the documentation and demo scenes for Lean Texture.



Required Package

NOTE  Lean Texture+ requires the Burst package made by Unity to be manually installed.

To install this package, first open the Package Manager window, and wait for the package list to finish downloading.

Click the dropdown, and select Unity Registry, so you can see all of Unity's official packages.

Once the list loads, scroll down to find the Burst package, and click Install.

You should now be able to enjoy the full Lean Texture+ experience!



How do I get started?


Install Burst

If you haven't already, make sure you install the Burst package made by Unity. Steps on how to install this are described HERE.



Create Lean Texture

Go to the Project tab, right click on a texture asset, and select the Create / Lean / Texture option.

This will create a new LeanTexture asset alongside your texture. This asset will be pre-configured with your texture.



Add Filters

Click the Add Filter button, and select the kind of filter you want to apply to your texture.

After you add a filter, you can adjust its settings in the inspector.

At the bottom of the inspector you can see a preview of the texture with all the filters you have applied.

NOTE  You can add multiple filters.


Save Changes To Project

Once you're happy with your texture modifications, you can click the Save button. This will save the modified texture to your project alongside the LeanTexture asset, with the same filename.








Assets

Here's a list of all my other assets, please check them out!

You can also view this list on my Asset Store page.

Lean Touch

Lean Touch

Rapidly develop your game with consistent input across desktop & mobile using Lean Touch. This lightweight asset comes with many modular components, allowing you to customize them to your exact project needs!


Lean Touch+

Lean Touch+

Lean Touch+ is an extension to the popular Lean Touch asset, adding many more example scenes.


Lean Localization

Lean Localization

Lean Localization is a localization library that's designed to be as simple to use as possible for both designers, and programmers.


Lean Pool

Lean Pool

Quickly optimize the performance of your games using Lean Pool. Within minutes you can use this lightweight asset to preload, recycle, and limit the spawning of your prefabs.


Lean Transition

Lean Transition

Quickly polish your games using Lean Transition. This asset allows you to easily tween or animate almost anything in your game, making it transition smoothly.


Lean GUI

Lean GUI

Lean GUI is a colllection of components that extend Unity's GUI system, allowing you to rapidly enhance the user experience (UX) of your game's UI.


Lean GUI Shapes

Lean GUI Shapes

Lean GUI Shapes allows you to quickly add lines, rounded boxes, polygons, and much more to your GUI!


Lean Texture

Lean Texture

Lean Texture allows you quickly modify textures in your project with a range of filters, pack them together into channels, and much more!


Lean Texture+

Lean Texture+

Lean Texture+ is an extension to Lean Texture, adding many new types of texture modification tools!


CW Spaceships - Build & Destroy

CW Spaceships

Build your dream spaceship, and then have fun destroying it!


CW Orbit - Modular Backgrounds

CW Orbit

Take your space game to the next level with this collection of 8K background planets. Just drag and drop them in, and enjoy orbiting around them.


CW Nebula - Modular Backgrounds

CW Nebula

Add stunning nebula backgrounds to your 3D space games with ease.


CW Gas Giant - Modular Backgrounds

CW Gas Giant

Add stunning gas giant backgrounds to your 3D space games with ease.


CW Galaxy - Modular Backgrounds

CW Galaxy

Add stunning galaxy backgrounds to your 3D space games with ease.


CW Silhouette - Modular Backgrounds

CW Silhouette

Add stunning silhouette backgrounds to your 3D space games with ease.


CW Cosmos - Modular Backgrounds

CW Cosmos

Add stunning nebula and galaxy backgrounds to your 3D space games with ease.


Paint in 3D

Paint in 3D

Paint all your objects using Paint in 3D - both in game, and in editor. All features are optimized with GPU accelerated texture painting, so you can enjoy consistent performance, even if you paint your objects one million times!


FLOW

FLOW

FLOW allows you to add large scale interactive fluids to your scene - all highly optimized using GPU acceleration.


Destructible 2D

Destructible 2D

Unlock the full potential of your 2D games using Destructible 2D, this asset allows you to quickly convert all your boring solid sprites into fully destructible ones!


Space Graphics Toolkit

Space Graphics Toolkit

Quickly make the space scene of your dreams using Space Graphics Toolkit. This huge collection of space effects can be customized and combined in any way you like, allowing you to quickly make realistic or fantasy worlds. Each feature has been heavily optimized to run on almost any device and platform.


Space Graphics Planets

Space Graphics Planets

Enhance your space scenes using this large pack of high detail volumetric planets. These planets are finished using the powerful planet features from Space Graphics Toolkit (not required).


Volumetric Audio

Volumetric Audio

Unity sounds only emanate from a single point source. This is great for explosions and footsteps, but quite often you need something more advanced. Volumetric Audio is an easy to use package that allows you to define boxes, spheres, capsules, paths, or meshes that sounds can emanate from.






Versions

2.0.2

Moved main build to Unity 2021.3.0f1.
Updated shaders to latest version.



2.0.1

Moved main build to Unity 2020.3.0f1.
Added Convert To Metallic filter.
Added Blend = AlphaBlend setting to Combine Textures filter.



2.0.0

NOTE  This is a massive update. To update you must first back up your project, delete the root Lean folder, then install the new version.

Changed folder structure to be inside Plugins/CW/LeanTexture+.
Updated inspector code to support third party assets that implement nested inspectors.
Added Distance to Replace Color filter.
Added Opacity to Replace Color filter.



1.0.4

Fixed png export when in linear color space.



1.0.3

Updated common library code.



1.0.1

Updated Lean Texture base code.
Added 'Then Resize' filter.



1.0.0

Initial release.







Components

LeanCreateSimplex

This allows you to create a new texture based on simplex noise.


int2
Size

The size of the created texture.



float
Frequency

The tiling/detail of the noise.



int
Octaves

The amount of noise layers that get mixed together.



int
Seed

The random seed used when generating the noise.




LeanFilterBlur

This allows you to blur the texture by the specified radius.


float
Radius

The radius of the blur in pixels.




LeanFilterCombine

This allows you to combine another texture into the current texture.


UnityEngine.Texture
Texture

The texture that will be combined with the current texture.



BlendMode
Blend

The technique used to combine the textures.

Crossfade = The RGBA channels will be linearly interpolated separately.

AlphaBlend = The RGBA channels will be blended based on the A channel of each texture.



float
Opacity

The opacity of the texture combination.




LeanFilterContrast

This allows you to modify the contrast of the texture.


float
Multiplier

The contrast of the texture will be multiplied by this value.




LeanFilterEdgeColor

This allows you to color the edges of the texture.


LeanHeight.Source
HeightSource

The texture heights will be calculated based on this aspect of the pixels.



Color
Color

The color that it will be applied to the edges.



float
Threshold

You can lower this value to reduce edge noise from smaller differences.



float
Strength

The strength of the edge effect.




LeanFilterInsert

This allows you to insert all filters on the specified texture into this one, as if this filter .


LeanTextureContainer
Texture

The texture whose filters will be copied.




LeanFilterInvert

This allows you to invert the pixels of the current texture.


ChannelType
Channel

Should this filter apply to all channels the same, or should each channel be separate?



float
Strength

The strength of the inversion.



float
StrengthR

The strength of the inversion.



float
StrengthG

The strength of the inversion.



float
StrengthB

The strength of the inversion.



float
StrengthA

The strength of the inversion.




LeanFilterMetallic

This allows you to convert the texture into a normal map based on height data extracted from the RGBA values in the specified way.


Color
TargetColor

The color of the most metallic part of the source texture.



float
DefaultMetallic

The metallic value given to areas that don't match the TargetColor.



float
TargetMetallic

The metallic value given to areas that match the TargetColor.



DistanceType
Distance

The calculation to find the difference between the current pixel color and the OldColor.

MaxChannel = The maximum difference between any of the color channels.

Average = The average of all channel differences.



float
Threshold

The OldColor can be off by this much.



float
Edge

How much should colors outside the Threshold be replaced?




LeanFilterMirror

This allows you to mirror the texture coordinates.


ChannelType
Channels

How should the mirroring be applied to the texture channels?



bool2
MirrorAxes

The horizontal and vertices axes that will be mirrored.



bool2
MirrorAxesR

The horizontal and vertices axes that will be mirrored.



bool2
MirrorAxesG

The horizontal and vertices axes that will be mirrored.



bool2
MirrorAxesB

The horizontal and vertices axes that will be mirrored.



bool2
MirrorAxesA

The horizontal and vertices axes that will be mirrored.




LeanFilterNormal

This allows you to convert the texture into a normal map based on height data extracted from the RGBA values in the specified way.


LeanHeight.Source
HeightSource

The texture heights will be calculated based on this aspect of the pixels.



float
Strength

The overall strength of the output normals.



float
Influence2

The contribution to the output normals based on 2 samples across each axis.



float
Influence4

The contribution to the output normals based on 4 samples across each axis.




LeanFilterNormalScale

This allows you to modify the scale/strength of the texture if it's a normal map.


float
Multiplier

The normal strength will be multiplied by this.




LeanFilterOffset

This allows you to offset the texture by the specified amount.


ChannelType
Channel

Should this filter apply to all channels the same, or should each channel be separate?



CoordinateType
Coordinate

The coordinate space of the offset.



float2
Offset

The amount the texture will be shifted across the x (right) and y (up) axes.



float2
OffsetR

The amount the texture will be shifted across the x (right) and y (up) axes.



float2
OffsetG

The amount the texture will be shifted across the x (right) and y (up) axes.



float2
OffsetB

The amount the texture will be shifted across the x (right) and y (up) axes.



float2
OffsetA

The amount the texture will be shifted across the x (right) and y (up) axes.




LeanFilterPixelate

This allows you to pixelate the texture by the specified amount.


float
Scale

The scale of the pixelation.




LeanFilterQuantize

This allows you to modify the contrast of the texture.


ChannelType
Channels

How should the texture channels should be modified?



int
Values

The amount of possible values each channel can have.



int
ValuesR

The amount of possible values this channel can have.



int
ValuesG

The amount of possible values this channel can have.



int
ValuesB

The amount of possible values this channel can have.



int
ValuesA

The amount of possible values this channel can have.




LeanFilterReplace

This allows you to replace the specified color in the texture with another color.


Color
OldColor

The color that will be replaced.



Color
NewColor

The color that it will be replaced with.



DistanceType
Distance

The calculation to find the difference between the current pixel color and the OldColor.

MaxChannel = The maximum difference between any of the color channels.

Average = The average of all channel differences.



float
Threshold

The OldColor can be off by this much.



float
Edge

How much should colors outside the Threshold be replaced?



float
Opacity

The overall color replacement strength.




LeanFilterResize

This allows you to resize the current the texture.


int2
Size

The new size of the texture.

-1 = No change.




LeanFilterSeamless

This allows you to convert the texture into a seamless one.


float
Thickness

The thickness of the transition region.



float
OffsetX

The position along the texture the seam will be filled in with.



float
OffsetY

The position along the texture the seam will be filled in with.



LeanHeight.Source
HeightSource

The texture transition will be modified based on height data from this aspect of the pixels.



float
HeightInfluence

The amount of impact the height data has on the transition.



float
NoiseTiling

The frequency of the noise data.



float
NoiseInfluence

The amount of impact the noise data has on the transition.




LeanFilterSharpen

This allows you to modify the sharpness of the texture.


ChannelType
Channels

How should the texture channels should be modified?



float
Multiplier

The sharpness of the texture will be multiplied by this value.



float
MultiplierR

The sharpness of the texture will be multiplied by this value.



float
MultiplierG

The sharpness of the texture will be multiplied by this value.



float
MultiplierB

The sharpness of the texture will be multiplied by this value.



float
MultiplierA

The sharpness of the texture will be multiplied by this value.




LeanFilterSwizzle

This allows you to swap the channels in the current texture.


ChannelType
RedChannel

The channel of the current texture that will end up in the red channel of the output texture.



ChannelType
GreenChannel

The channel of the current texture that will end up in the green channel of the output texture.



ChannelType
BlueChannel

The channel of the current texture that will end up in the blue channel of the output texture.



ChannelType
AlphaChannel

The channel of the current texture that will end up in the alpha channel of the output texture.




LeanHeight

This class can calculate the height of a texture based on the specified technique.



Index

What is Lean Texture+?

Required Package

How do I get started?



Assets

Lean Touch

Lean Touch+

Lean Localization

Lean Pool

Lean Transition

Lean GUI

Lean GUI Shapes

Lean Texture

Lean Texture+

CW Spaceships

CW Orbit

CW Nebula

CW Gas Giant

CW Galaxy

CW Silhouette

CW Cosmos

Paint in 3D

FLOW

Destructible 2D

Space Graphics Toolkit

Space Graphics Planets

Volumetric Audio



Versions

2.0.2

2.0.1

2.0.0

1.0.4

1.0.3

1.0.1

1.0.0



Components

LeanCreateSimplex

LeanFilterBlur

LeanFilterCombine

LeanFilterContrast

LeanFilterEdgeColor

LeanFilterInsert

LeanFilterInvert

LeanFilterMetallic

LeanFilterMirror

LeanFilterNormal

LeanFilterNormalScale

LeanFilterOffset

LeanFilterPixelate

LeanFilterQuantize

LeanFilterReplace

LeanFilterResize

LeanFilterSeamless

LeanFilterSharpen

LeanFilterSwizzle

LeanHeight