{"version":"1.0","type":"rich","title":"https://unity3d.com/how-to/novel-lighting-workflow-in-Unity","description":"This example shows a custom lighting calculation for vertex-lit objects in Unity, reducing the cost of multiple directional lights by packing their data into vector4 arrays. The `ShadeVertexLightsAtten.cginc` file defines a function that computes diffuse lighting and distance-based attenuation for four lights simultaneously, using arithmetic on `float4` types to process all lights in parallel. It reads light positions, colors, and squared attenuation factors, then sums the weighted contributions into a single output color. The code relies on Unity’s shader language (CG/HLSL) and its built-in vertex lighting pipeline.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-577988ee944050f4794d93604a99a650?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}