NextGenSprites has been updated to 1.2.1 with mostly bug fixes and changes here and there, though there is one new feature and that is a method to change materials smoothly from a Properties Collection.
This Update is already online on itch.io and it is also awaiting for approval from the AssetStore Team.
Changelog
+++Please Note+++
If you come from a previous Version, you may need to delete:
:)[quote=“garrido86, post:24, topic: 604007, username:garrido86”]
Do you have anything specific in mind? I could add a helper function for tweening Shader property values and also transitions between two materials.
edit
There actually is already float and color tweening in dotweening, check DoTweens docu
Example:
//Tween over 5 seconds the Blur reflection to 0.1
myMaterial.DOFloat(0.1f, ShaderFloat.ReflectionBlur.GetString(), 5f);
edit2
I have now requested the DoTween author to add Material transition tweening. Let’s hope it comes soon
[/quote]
Yes my bad i don’t read the doc properly,anyway material transition sounds wonderful
Your wish shall come true, I have worked today on the material transition and already submitted my new version to the AssetStore To use the feature, you need to instantiate an DualMaterial object which you feed two source materials.
DualMaterials returns the lerped material and the lerp itself can be set via the LerpMaterial method. And from here you can use a Tweening Engine like DoTween to handle the lerping animation.
I have included a simple demo scenes which explains better how it works. I will also update the wiki asap.
Please note that DualMaterial only takes the float and color values, textures currently are not supported.
Some might wonder why I went all the length to implement my own material lerping if unity already provides a Material Lerping feature? Well, the problem is that Unity’s lerping method only interpolates internally with an easeInOut easing and this obviously breaks other Tweening Engines.
I just purchased this and was super excited and hoped to be able to integrate this on my UI but am using screen space overlay… which looks to be a deal breaker right? There’s no way to have these shaders on a screen space overlay or camera correct? Getting a world space canvas to scale for multiple resolutions seems like a major headache… any pointers on how best to do this because I must say these effects are really freaking sweat.
Edit- ok, never mind, it looks like it works fine with screen space camera. saweeet!
Hi Garrido
i Just bought your asset and i have a problem.
I am making a isometric game and I had my sprites with a custom shader for solving the z depth /sorting layer issue.
The problem is that i can’t use this shader with your asset because i can’t have both running.
The problem happens this way.
As seen in picture i have 2 sprites that act as background (horizontal) and a character sprite who is vertical.
the 2 background sprites, the island and the ocean has the nextgen shader. the character has the sprite default shader and as you can see, it looks good.
But when i activate the nextgen shader in the character it disappears, covered by the 2 background images.
Do you mind to send me your old custom shader? Then I can look into it
Edit
To clarify, you can already cast shadows with NGS Shaders, that’s no problem. Just enable Shadow Casting on the Sprite Renderer and you are good to go. But receiving Shadows is not possible but you can always use a plane.
Is this compatible with spritelamp produced data such as normal maps, depth maps, occlusion maps, specular maps, etc.
Does it allow for self shadowing, specularity, etc?