{"id":19867475,"url":"https://github.com/erkaman/glsl-worley","last_synced_at":"2025-05-02T06:31:01.706Z","repository":{"id":71512408,"uuid":"58232574","full_name":"Erkaman/glsl-worley","owner":"Erkaman","description":"Worley noise implementation for WebGL shaders","archived":false,"fork":false,"pushed_at":"2016-05-06T20:30:38.000Z","size":378,"stargazers_count":90,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T23:14:12.513Z","etag":null,"topics":["cell-noise","cellular-noise","glsl","javascript","noise","shader","shaders","voronoi","webgl","worley-noise"],"latest_commit_sha":null,"homepage":"http://erkaman.github.io/glsl-worley/","language":"GLSL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Erkaman.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-06T20:15:37.000Z","updated_at":"2025-03-16T00:54:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"726787df-a3db-4ef3-ad1c-972cb09034e1","html_url":"https://github.com/Erkaman/glsl-worley","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erkaman%2Fglsl-worley","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erkaman%2Fglsl-worley/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erkaman%2Fglsl-worley/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erkaman%2Fglsl-worley/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erkaman","download_url":"https://codeload.github.com/Erkaman/glsl-worley/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998240,"owners_count":21677956,"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":["cell-noise","cellular-noise","glsl","javascript","noise","shader","shaders","voronoi","webgl","worley-noise"],"created_at":"2024-11-12T15:29:26.660Z","updated_at":"2025-05-02T06:31:01.369Z","avatar_url":"https://github.com/Erkaman.png","language":"GLSL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glsl-worley\n\n\u003cimg src=\"images/worley.png\" width=\"356\" height=\"366\" /\u003e\n\nFrom this module, a GLSL implementation of Worley Noise written by [Stefan\nGustavson](http://webstaff.itn.liu.se/~stegu/GLSL-cellular/GLSL-cellular-notes.pdf) can be imported.\n\nA demo can be found [here](http://erkaman.github.io/glsl-worley/)\n\n## Usage\n\nThis module provides four functions, and they can be exported as\n\n```glsl\n#pragma glslify: worley3D = require(glsl-worley/worley3D.glsl)\n#pragma glslify: worley2x2x2 = require(glsl-worley/worley2x2x2.glsl)\n#pragma glslify: worley2D = require(glsl-worley/worley2D.glsl)\n#pragma glslify: worley2x2 = require(glsl-worley/worley2x2.glsl)\n```\n\nAnd then they can easily be used to generate a texture in a shader by doing something like:\n\n```glsl\n  vec2 F = worley3D(vPosition, 1.0, false);\n  float F1 = F.x;\n  float F2 = F.y;\n  gl_FragColor = vec4(vec3(F2-F1), 1.0);\n```\n\n`worley3D` is defined as `vec2 worley3D(vec3 P, float jitter, bool manhattanDistance)`. It returns a `vec2`\n where `x` is `F1` and `y` is `F2`(it is assumed that the reader knows the meaning of these two).\n`P` is the input point, `jitter` is the amount of jitter in the pattern, and if `manhattanDistance` is true,\nthen a manhattan distance is used to generate the pattern, instead of the usual Euclidean distance(this basically makes\n the noise appear more \"jagged\").\n\n The remaining three functions take the same arguments, except that in the case of `worley2D` and `worley2x2`, `P` is a\n `vec2`.\n\n `worley2x2x2` is basically a faster version of `worley3D`. But be aware that it has some artifacts. In the same manner,\n `worley2x2` is basically a faster version of `worley2D`, but with some potential artifacts.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferkaman%2Fglsl-worley","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferkaman%2Fglsl-worley","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferkaman%2Fglsl-worley/lists"}