I am using one of the packages from the asset store and using its
Polyline feature for wire rendering. There are thousands of wires and its taking much fps/Batch counts. The reason of the lack of support for static batching. Now there is a workaround suggested by the author of the package.
if you don't use polylines for anything other than that, and all your shaders use the same properties, you could hardcode all per-instance properties into the shader
Due to a lack of shader knowledge(I am developing the knowledge currently and it will take time) I am unable to hard code the above properties: I tried and here is the current scenario:
#define int _ScaleMode = 1 #define half4 _Color = (0,0,0,0) #define float4 _PointStart = (0,0,0,0) #define float4 _PointEnd = (0,0,0,0) #define half _Thickness = 0.5 #define int _ThicknessSpace = 1 #define half _DashSize = 1 #define half _DashOffset =1 #define int _Alignment =1
HOw do i correctly hard code above values?