unitycoder/DoomStyleBillboardTest

How to get batching to work

Opened this issue · 5 comments

would be nice to have batching.. if can make it work with billboarding
#5

Possible issue in current shader:
Now it takes model position and in batching models are combined, so it gets the combined mesh position, instead of its own position..?

some static batch settings work with billboarding, but cannot move the object.. would be still useful for static sprites, trees, objects..
http://forum.unity3d.com/threads/help-with-billboard-alpha-shader.183371/#post-2158534

some info, "pass the local objects vertex positions into the shader by using any unused channel such as color or normal"
http://forum.unity3d.com/threads/scaling-in-the-vertex-shader.197815/#post-2283678

extra info here: http://docs.unity3d.com/Manual/SL-SubShaderTags.html

DisableBatching tag

Some shaders (mostly ones that do object-space vertex deformations) do not work when Draw Call Batching is used – that’s because batching transforms all geometry into world space, so “object space” is lost.

DisableBatching tag can be used to incidate that. There are three possible values: “True” (always disables batching for this shader), “False” (does not disable batching; this is default) and “LODFading” (disable batching when LOD fading is active; mostly used on trees).