- Edited
Normal map performance
Hi,
if I want to use a normal map in spine animation (I develop with xna runtime), I must render the skeleton two time, this is right?
First the diffuse skleton, than a clone of the same skeleton file with normal map atlas, or the same skeleton with a normal map skin.
I am saying right?
therefore, doing so the performances are halved?
Another question. Is there a way to change the texture at runtime in xna without use skin?
because the ideal would be only to replace the texture with normal map, in this way I can create normal textures directly from the atlas file and not on every single branch
Cristian Zerbinati
this is my first test.
if I could modify the texture to render the normalmap it would be optimized
it is much more convenient to produce a normalmap from an entire atlas texture than from any single branch
I hope it is possibile in XNA too
regards
Cristian Zerbinati
Ciao Cristian. We will create a normalmap shader for you that binds the normalmap as a second texture in a single pass.
This would also resolve your other request here, right:
MaterialPropertyBlock to replace texture of Spine Animation
Normalmap support is now officially provided as a single-pass shader via the latest commits.
There is now an additional effect SpineEffectNormalmap
, and XnaTextureLoader
supports two additional parameters:
Atlas atlas = new Atlas(assetsFolder + atlasName + ".atlas", new XnaTextureLoader(GraphicsDevice,
loadMultipleTextureLayers: true, textureSuffixes: new string[] { "", "_normals" }));
Usage is shown in the example code. Please git-pull the latest changes and let us know if this is fulfilling your requirements!
The issue has been tracked under this ticket:
https://github.com/EsotericSoftware/spine-runtimes/issues/1645
WOW Thank you! I test it as soon as!!!
it's work, so cool! very very thank you!!!!!!!!!!!!!!
I'm very happy of the result
Thanks for your kind reply, very glad that you like it! :nerd: