{"id":15381560,"url":"https://github.com/riccardoscalco/glsl-rectangular-function","last_synced_at":"2026-01-06T22:50:50.736Z","repository":{"id":52415671,"uuid":"189484027","full_name":"riccardoscalco/glsl-rectangular-function","owner":"riccardoscalco","description":"Glsl implementation of the rectangular function.","archived":false,"fork":false,"pushed_at":"2021-04-29T20:39:46.000Z","size":52,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T09:42:14.556Z","etag":null,"topics":["glsl","glslify","math","rectangular","step","webgl"],"latest_commit_sha":null,"homepage":null,"language":"GLSL","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/riccardoscalco.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}},"created_at":"2019-05-30T21:20:19.000Z","updated_at":"2019-05-30T21:23:06.000Z","dependencies_parsed_at":"2022-09-06T08:02:14.861Z","dependency_job_id":null,"html_url":"https://github.com/riccardoscalco/glsl-rectangular-function","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardoscalco%2Fglsl-rectangular-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardoscalco%2Fglsl-rectangular-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardoscalco%2Fglsl-rectangular-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardoscalco%2Fglsl-rectangular-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riccardoscalco","download_url":"https://codeload.github.com/riccardoscalco/glsl-rectangular-function/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245936533,"owners_count":20696846,"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":["glsl","glslify","math","rectangular","step","webgl"],"created_at":"2024-10-01T14:27:55.759Z","updated_at":"2026-01-06T22:50:50.692Z","avatar_url":"https://github.com/riccardoscalco.png","language":"GLSL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glsl-rectangular-function\n\nGlsl implementation of the [rectangular function](https://en.wikipedia.org/wiki/Rectangular_function).\n\n## Install\n\n```sh\nnpm install glsl-rectangular-function\n```\n\n## Usage\n\n```glsl\n#pragma glslify: rectangularFunction = require(glsl-rectangular-function)\n\nvoid main() {\n\tvec2 p = gl_FragCoord.xy / resolution.xy;\n\n\tfloat center = 0.5;\n\tfloat width = 0.25;\n\tfloat y = rectangularFunction(p.x, center, width);\n\n\tgl_FragColor = vec4(vec3(y), 1.0);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friccardoscalco%2Fglsl-rectangular-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friccardoscalco%2Fglsl-rectangular-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friccardoscalco%2Fglsl-rectangular-function/lists"}