{"id":18595470,"url":"https://github.com/ericjang/cpu-render","last_synced_at":"2025-11-02T05:30:31.206Z","repository":{"id":26095656,"uuid":"29539733","full_name":"ericjang/cpu-render","owner":"ericjang","description":"Dumb CPU renderer for debugging shadertoy shaders","archived":false,"fork":false,"pushed_at":"2015-01-20T16:38:52.000Z","size":3468,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-26T20:43:00.180Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ericjang.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}},"created_at":"2015-01-20T16:37:17.000Z","updated_at":"2020-05-01T06:25:58.000Z","dependencies_parsed_at":"2022-08-25T01:00:53.822Z","dependency_job_id":null,"html_url":"https://github.com/ericjang/cpu-render","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/ericjang%2Fcpu-render","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericjang%2Fcpu-render/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericjang%2Fcpu-render/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericjang%2Fcpu-render/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericjang","download_url":"https://codeload.github.com/ericjang/cpu-render/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239379322,"owners_count":19628684,"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":"2024-11-07T01:19:47.495Z","updated_at":"2025-11-02T05:30:31.139Z","avatar_url":"https://github.com/ericjang.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"cpu-render\n==============\n\nThis is a simple implementation of a render() function that uses GLM vector\ntypes and operators to mimic the syntax of a GLSL shader. This is useful when \ntrying to figure out subtle problems.\n\nFeatures:\n\n+ clicking on a pixel prints the coordinates to the console.\n\n## Translating GLSL to C++\n\nGLM fortunately implements many of the native functions of GLSL, so porting GLSL code to C++ is easy. A good strategy is to copy-paste your shader code as-is into C++, and then fix each individual compile error (there shouldn't be too many).\n\nSome common translation tasks:\n\n+ float literals in GLSL are specified like `float x = 2.0`, but in C++ they have to be specified as 2.0f or else they will be treated as doubles and won't mix with glm `vec2`,`vec3`, and `vec4` types, which are based on floats.\n\n+ swizzling in GLM works like that of GLSL, but you need to add `()` after:\n`myvec.xyzz` in GLSL becomes `myvec.xyzz()` in C++.\n\nIf you have suggestions for how this tool can be improved,feel free to share.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericjang%2Fcpu-render","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericjang%2Fcpu-render","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericjang%2Fcpu-render/lists"}