{"id":23389744,"url":"https://github.com/volutedberet/vertexlighting","last_synced_at":"2025-04-11T08:10:21.409Z","repository":{"id":269229493,"uuid":"904570643","full_name":"Volutedberet/VertexLighting","owner":"Volutedberet","description":"A custom lighting system for unity, that uses vertex colors, to get an older game look","archived":false,"fork":false,"pushed_at":"2024-12-21T23:01:03.000Z","size":47953,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-22T00:17:16.460Z","etag":null,"topics":["lighting","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Volutedberet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-17T06:33:46.000Z","updated_at":"2024-12-21T23:01:06.000Z","dependencies_parsed_at":"2024-12-22T00:17:18.644Z","dependency_job_id":"8923e081-0cf6-4f46-950c-4197f9d43929","html_url":"https://github.com/Volutedberet/VertexLighting","commit_stats":null,"previous_names":["volutedberet/vertexlighting"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volutedberet%2FVertexLighting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volutedberet%2FVertexLighting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volutedberet%2FVertexLighting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Volutedberet%2FVertexLighting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Volutedberet","download_url":"https://codeload.github.com/Volutedberet/VertexLighting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230788450,"owners_count":18280339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lighting","unity","unity3d"],"created_at":"2024-12-22T03:17:48.750Z","updated_at":"2024-12-22T03:17:49.486Z","avatar_url":"https://github.com/Volutedberet.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vertex Based Lighting, for Unity URP\n![](https://github.com/Volutedberet/VertexLighting/blob/main/VertexGif.gif)\n\n## This is a lighting system, that uses vertex colors to fake lighting, which was a technique used by older games like Silent Hill 1\n![](https://github.com/Volutedberet/VertexLighting/blob/main/LightExample.png)\n## It produces some nice and blocky lighting, perfectly fitting for making games that look like they belong on the ps1\n\n### Key Features:\n```\n-Realtime Lights:\n    -Updated each tick, lighting up static and nonstatic surfaces\n    (Intended for places where the light is always on, and the performance cost doesn't matter)\n\n-Baked Lights:\n    -On Load, bakes it's light onto static surfaces\n    -Baked lighting can be temporarily overwritten by realtime lights with more intensity\n    (Intended for lighting background enviroments, since it's lighting doesn't translate to dynamic surfaces that move)\n\n-Dynamic Lights:\n    -On Load, bakes just like a static, but can act as a realtime light, when the main camera is close\n    -The activation distance is changable\n    (Intended for main enviroment lighting, since they are a middle ground between static and realtime, offering performance even when there is a lot of them, but they can still cast lighting on dynamic surfaces when needed)\n\n-4 lighting modes:\n    -lit (Lights rendered as normal)\n    -Unlit (No lighting)\n    -Light Debug (Only the lighting is rendered)\n    -Vertex Debug (Displays a gradient that helps you see how geometry dense the area is)\n\n-Adjustable update rate, to get even chunkier results\n\n-Custom main shader, that supports detail textures\n\n-3 Demo Scenes, showcasing a setup for each lighting mode\n```\n\n\n# Quick Guide:\n### Tip: The lightings resolution is 1-1 to the resolution of your meshes, so to get the intended blocky lighting, you must use low poly count meshes\n\n## Setting up your enviroment:\n```\nThis system uses a custom shader, called Uber. \n    All your materials must use either this shader, or use a shader that multiplies the final color with the vertex color\n\nThe lighting is handled by the LightingManager component, there is a drag and drop prefab that has this component on it, but you don't have to use that\n    On this component you can change:\n        -Base Light Color (What color is displayed when no light is found on an area. Set it to fully black if you want no lighting)\n        -Updates per Second (How many seconds need to pass between each lighting update. Set it to 0 to update lighting each frame)\n        -Dynamic Light Distance (How close the object marked as Main Camera has to be to a dynamic light for it to activate)\n        -Lighting mode (mainly a debug tool, but can be useful to check for dark spots and vertex density)\nIf this component isn't on an object in the scene, the lighting wont update\n\nThe lighting system only uses objects that have the \"LightableSurface\" component on them\n    This component allows you to mark the object as static\n        -Marking an object static means that it wont ever move\n        -Marking an object static will allow baking lights onto the surface\nMake sure to add it to any object you want lighting on\n```\n\n## Setting up your lights\n```\nAdding a light is extremely simple, you just add the LightPoint component to an object\n    On this component you can change:\n        -Radious / Insensity (How far, and how strong the light is)\n        -Light Mode (Changes how the light behaves, see below what each mode does)\n            -Realtime: Updates every tick, lights up static and dynamic surfaces\n            -Baked: Lights up static surfaces on start, and the lighting is stored\n            -Dynamic: If camera is close, acts as a realtime light, but it does a bake on start that it falls back to once the camera is farther away\n```\n\n## You are free to use and modify this code as you wish, crediting is not needed, but it's appreciated :3","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolutedberet%2Fvertexlighting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolutedberet%2Fvertexlighting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolutedberet%2Fvertexlighting/lists"}