{"id":26669284,"url":"https://github.com/eclipseisoffline/iris-coloured-lights","last_synced_at":"2026-01-05T20:45:15.905Z","repository":{"id":216383712,"uuid":"741193743","full_name":"eclipseisoffline/iris-coloured-lights","owner":"eclipseisoffline","description":"Coloured Lights is a library to easily add coloured light blocks to your Minecraft Iris shader.","archived":false,"fork":false,"pushed_at":"2024-01-10T16:31:50.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-18T08:18:12.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"GLSL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipseisoffline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-09T22:20:05.000Z","updated_at":"2024-01-18T08:18:16.997Z","dependencies_parsed_at":"2024-01-18T08:18:16.436Z","dependency_job_id":"393f6477-7caa-4383-8f6b-4cf4b59645c8","html_url":"https://github.com/eclipseisoffline/iris-coloured-lights","commit_stats":null,"previous_names":["systemneutron/iris-coloured-lights","eclipseisoffline/iris-coloured-lights"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipseisoffline%2Firis-coloured-lights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipseisoffline%2Firis-coloured-lights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipseisoffline%2Firis-coloured-lights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipseisoffline%2Firis-coloured-lights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipseisoffline","download_url":"https://codeload.github.com/eclipseisoffline/iris-coloured-lights/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245550537,"owners_count":20633872,"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":[],"created_at":"2025-03-25T21:48:11.613Z","updated_at":"2026-01-05T20:45:15.862Z","avatar_url":"https://github.com/eclipseisoffline.png","language":"GLSL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coloured Lights - Minecraft Iris shader library\n\nColoured Lights is a library to easily add coloured light blocks to your Minecraft Iris shader. SSBOs are a required feature. Can also be used standalone.\n\n## License\n\nAll the code in this repository is licensed under GNU GPLv3.\n\n## Usage\n\n### Using standalone\n\nDownload a ZIP file of this repository on GitHub, then extract the ZIP file over to your shaderpacks directory. Everything should work out of the box.\n\n### Including in your own shaderpack\n\nAll shaders using the library must be using GLSL 430 or above.\nCopy the `lib` folder in the `shaders` directory to your own `shaders` directory. In your `gbuffers_terrain` vertex shader, add the following lines at the top, below your `#version` statement:\n\n```glsl\n#define VERTEX\n\n#include /lib/cl/common.glsl\n```\n\nYour vertex shader must be using the compatibility profile of GLSL. In your main function, add the following line:\n```glsl\nlightCheck(at_midBlock, mc_Entity);  \n```\n\n`at_midBlock` and `mc_Entity` being input attributes.\n\nIn every fragment shader where you will want to apply the coloured lights, add the following line below your `#version` statement:\n\n```glsl\n#include /lib/cl/common.glsl  \n```\n\nYour fragment shader can use the core profile of modern GLSL versions. In the main function, add the following lines:\n\n```glsl\nvec4 startLight = texture(lightmap, lightMapCoord);\ncolortex0 = applyColouredLight(colortex0, startLight, worldPos, localChunkPos);\n```\n\n`colortex0` is your output colour. It's important that you don't multiply your output colour with the lightmap texture value, the `applyColouredLight` method will do that for you.\n\n`worldPos` is a `vec3` and `localChunkPos` is a `flat ivec3`, both passed from the vertex shader, and can be calculated like this:\n\n```glsl\nworldPos = modelToWorldSpace(gl_Vertex.xyz);\nlocalChunkPos = blockPosToChunkPos(blockPosToLocalPos(worldPosToBlockPos(worldPos, at_midBlock)));\n```\n\n`at_midBlock` being an input attribute.\n\nCopy the `begin.csh` file in the `shaders` directory over to your `shaders` directory.\n\nThe library contains some default block light colours, but you'll have to include the block IDs. Merge the `block.properties` file in the `shaders` directory with your own `block.properties` file.\n\nYou'll also have to correctly set up your SSBOs. To do this, merge the `shaders.properties` file in the `shaders` directory with your own `shaders.properties` file. This will also include a nice option screen for the coloured lights. Copy the `lang` directory over to your `shaders` directory for English translation keys of the option screen.\n\n#### Adding/changing the coloured light blocks\n\nOpen the `/lib/cl/lights.glsl` file in your `shaders` directory. This should contain the  `colouredLights` array, which contains all the coloured light blocks. The syntax is as follows:\n\n```glsl\nconst ColouredLight[] colouredLights = ColouredLight[\u003carray size\u003e](\n    ColouredLight(\u003cblock ID\u003e, \u003clight level\u003e, \u003clight colour\u003e, \u003cnatural\u003e),\n    ...\n);\n```\n\n- `\u003carray size\u003e` is the size of the `colouredLights` array.\n- `\u003cblock ID\u003e` is an unsigned integer, the ID of the coloured light block as defined in `block.properties`.\n- `\u003clight level\u003e` is the light level the block gives (can be a float, but is recommended to be an integer).\n- `\u003clight colour\u003e` is a `vec3`, the colour the block gives off.\n- `\u003cnatural\u003e` is a boolean. Only set it to `false` if the block in question doesn't give light in vanilla.\n\n## Known issues\n\n- Light colours render through blocks due to occlusion culling issues.\n- Light colours can glitch out in the Nether (and possibly End).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipseisoffline%2Firis-coloured-lights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipseisoffline%2Firis-coloured-lights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipseisoffline%2Firis-coloured-lights/lists"}