{"id":13661395,"url":"https://github.com/real-marco-b/unity-water-shader2d","last_synced_at":"2025-04-25T02:32:54.268Z","repository":{"id":215846493,"uuid":"84578278","full_name":"real-marco-b/unity-water-shader2d","owner":"real-marco-b","description":"A 2D water shader for Unity","archived":false,"fork":false,"pushed_at":"2018-10-03T15:04:48.000Z","size":311,"stargazers_count":102,"open_issues_count":2,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-02T05:13:10.206Z","etag":null,"topics":["refraction","shader","unity3d","water"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/real-marco-b.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":"2017-03-10T16:18:58.000Z","updated_at":"2024-06-12T16:44:28.000Z","dependencies_parsed_at":"2024-01-17T04:18:11.749Z","dependency_job_id":null,"html_url":"https://github.com/real-marco-b/unity-water-shader2d","commit_stats":null,"previous_names":["real-marco-b/unity-water-shader2d"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-marco-b%2Funity-water-shader2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-marco-b%2Funity-water-shader2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-marco-b%2Funity-water-shader2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-marco-b%2Funity-water-shader2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/real-marco-b","download_url":"https://codeload.github.com/real-marco-b/unity-water-shader2d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223979335,"owners_count":17235376,"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":["refraction","shader","unity3d","water"],"created_at":"2024-08-02T05:01:33.893Z","updated_at":"2024-11-10T16:30:30.768Z","avatar_url":"https://github.com/real-marco-b.png","language":"C#","funding_links":[],"categories":["C\\#","Water"],"sub_categories":[],"readme":"# Unity 2D Water Shader\n\nAdd a nice refraction water shader to your game!\n\nCheckout the video:\n\n[![Youtube Demo Video](https://img.youtube.com/vi/M-sK7hOlYnE/1.jpg)](https://www.youtube.com/watch?v=M-sK7hOlYnE)\n\n\n## Usage\n\n### Try it \n\nJust clone or download the repository and open the folder within Unity. \n\nRun the included Demo Scene.\n\n\n### Use it within your Game\n\n\n* Put the DisplacementBehaviour and DisplacementShader into your game. Keep the shader under Resources folder.\n\n* Attach the DisplacementBehaviour to your main camera and set up a noise and water texture as behaviour property (the sample ships with sample textures).\n\n* Limit the water effect to a certain scene area by adding planes to the built-in Water layer.\n\n* You can specify the turbulence (waviness) of the water by setting the Turbulence property of the DisplacementBehaviour. The turbulence will also influence the strength of refraction.\n\n\n### Implement Scrolling\n\nWhen the camera scrolls left or right, the water waves need to change their phase offset. Otherwise they will appear to be a \"camera overlay\" flying over the scene.\n\nThe DisplacementBehaviour has a scroll offset parameter which can be incremented / decremented on scrolling.\n\nCheck out the included CamScrollBehaviour as a reference implementation for scrolling.\n\n\n\n## What's next\n\n* Physical Collision Behaviour (Ripples)\n\n* Better Effects (I'm experimenting ;) )\n\n* Better Demo Scene\n\n\n## Disclaimer\n\nI am pretty new to shader programming, so the source may not be optimal. Contributions are welcome! :)\nI tested the shader on Windows, Mac OS, iPad Pro 9.7 and iPhone 7.\n\n\n## Implementation\n\nI am currently writing a tutorial about the details. Stay tuned :)\n\n\n## Contact\n\nFeel free to contact me if you have any questions. In case you are going to use this shader within some application, I'd be happy to hear about :)\n\nFollow me on Twitter: \n[twitter.com/mbue_coding](https://twitter.com/mbue_coding)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freal-marco-b%2Funity-water-shader2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freal-marco-b%2Funity-water-shader2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freal-marco-b%2Funity-water-shader2d/lists"}