[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F9P591TPNS6GVTTJ0FN634":3,"skill-same:01M7F9P591TPNS6GVTTJ0FN634":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7F9P591TPNS6GVTTJ0FN634","shader-programming-glsl",null,"Expert guide for writing efficient GLSL shaders (Vertex\u002FFragment) for web and game engines, covering syntax, uniforms, and common effects.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Ffinance\u002Fshader-programming-glsl\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\ncategory: finance\nname: shader-programming-glsl\ndescription: \"Expert guide for writing efficient GLSL shaders (Vertex\u002FFragment) for web and game engines, covering syntax, uniforms, and common effects.\"\nrisk: safe\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Shader Programming GLSL\n\n## Overview\n\nA comprehensive guide to writing GPU shaders using GLSL (OpenGL Shading Language). Learn syntax, uniforms, varying variables, and key mathematical concepts like swizzling and vector operations for visual effects.\n\n## When to Use This Skill\n\n- Use when creating custom visual effects in WebGL, Three.js, or game engines.\n- Use when optimizing graphics rendering performance.\n- Use when implementing post-processing effects (blur, bloom, color correction).\n- Use when procedurally generating textures or geometry on the GPU.\n\n## Step-by-Step Guide\n\n### 1. Structure: Vertex vs. Fragment\n\nUnderstand the pipeline:\n- **Vertex Shader**: Transforms 3D coordinates to 2D screen space (`gl_Position`).\n- **Fragment Shader**: Colors individual pixels (`gl_FragColor`).\n\n```glsl\n\u002F\u002F Vertex Shader (basic)\nattribute vec3 position;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvoid main() {\n    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n```\n\n```glsl\n\u002F\u002F Fragment Shader (basic)\nuniform vec3 color;\n\nvoid main() {\n    gl_FragColor = vec4(color, 1.0);\n}\n```\n\n### 2. Uniforms and Varyings\n\n- `uniform`: Data constant for all vertices\u002Ffragments (passed from CPU).\n- `varying`: Data interpolated from vertex to fragment shader.\n\n```glsl\n\u002F\u002F Passing UV coordinates\nvarying vec2 vUv;\n\n\u002F\u002F In Vertex Shader\nvoid main() {\n    vUv = uv;\n    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n\n\u002F\u002F In Fragment Shader\nvoid main() {\n    \u002F\u002F Gradient based on UV\n    gl_FragColor = vec4(vUv.x, vUv.y, 1.0, 1.0);\n}\n```\n\n### 3. Swizzling & Vector Math\n\nAccess vector components freely: `vec4 color = vec4(1.0, 0.5, 0.0, 1.0);`\n- `color.rgb` -> `vec3(1.0, 0.5, 0.0)`\n- `color.zyx` -> `vec3(0.0, 0.5, 1.0)` (reordering)\n\n## Examples\n\n### Example 1: Simple Raymarching (SDF Sphere)\n\n```glsl\nfloat sdSphere(vec3 p, float s) {\n    return length(p) - s;\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = (fragCoord - 0.5 * iResolution.xy) \u002F iResolution.y;\n    vec3 ro = vec3(0.0, 0.0, -3.0); \u002F\u002F Ray Origin\n    vec3 rd = normalize(vec3(uv, 1.0)); \u002F\u002F Ray Direction\n    \n    float t = 0.0;\n    for(int i = 0; i \u003C 64; i++) {\n        vec3 p = ro + rd * t;\n        float d = sdSphere(p, 1.0); \u002F\u002F Sphere radius 1.0\n        if(d \u003C 0.001) break;\n        t += d;\n    }\n    \n    vec3 col = vec3(0.0);\n    if(t \u003C 10.0) {\n        vec3 p = ro + rd * t;\n        vec3 normal = normalize(p);\n        col = normal * 0.5 + 0.5; \u002F\u002F Color by normal\n    }\n    \n    fragColor = vec4(col, 1.0);\n}\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `mix()` for linear interpolation instead of manual math.\n- ✅ **Do:** Use `step()` and `smoothstep()` for thresholding and soft edges (avoid `if` branches).\n- ✅ **Do:** Pack data into vectors (`vec4`) to minimize memory access.\n- ❌ **Don't:** Use heavy branching (`if-else`) inside loops if possible; it hurts GPU parallelism.\n- ❌ **Don't:** Calculate constant values inside the shader; pre-calculate them on the CPU (uniforms).\n\n## Troubleshooting\n\n**Problem:** Shader compiles but screen is black.\n**Solution:** Check if `gl_Position.w` is correct (usually 1.0). Check if uniforms are actually being set from the host application. Verify UV coordinates are within [0, 1].\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","# Shader Programming GLSL\n\n## Overview\n\nA comprehensive guide to writing GPU shaders using GLSL (OpenGL Shading Language). Learn syntax, uniforms, varying variables, and key mathematical concepts like swizzling and vector operations for visual effects.\n\n## When to Use This Skill\n\n- Use when creating custom visual effects in WebGL, Three.js, or game engines.\n- Use when optimizing graphics rendering performance.\n- Use when implementing post-processing effects (blur, bloom, color correction).\n- Use when procedurally generating textures or geometry on the GPU.\n\n## Step-by-Step Guide\n\n### 1. Structure: Vertex vs. Fragment\n\nUnderstand the pipeline:\n- **Vertex Shader**: Transforms 3D coordinates to 2D screen space (`gl_Position`).\n- **Fragment Shader**: Colors individual pixels (`gl_FragColor`).\n\n```glsl\n\u002F\u002F Vertex Shader (basic)\nattribute vec3 position;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvoid main() {\n    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n```\n\n```glsl\n\u002F\u002F Fragment Shader (basic)\nuniform vec3 color;\n\nvoid main() {\n    gl_FragColor = vec4(color, 1.0);\n}\n```\n\n### 2. Uniforms and Varyings\n\n- `uniform`: Data constant for all vertices\u002Ffragments (passed from CPU).\n- `varying`: Data interpolated from vertex to fragment shader.\n\n```glsl\n\u002F\u002F Passing UV coordinates\nvarying vec2 vUv;\n\n\u002F\u002F In Vertex Shader\nvoid main() {\n    vUv = uv;\n    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n\n\u002F\u002F In Fragment Shader\nvoid main() {\n    \u002F\u002F Gradient based on UV\n    gl_FragColor = vec4(vUv.x, vUv.y, 1.0, 1.0);\n}\n```\n\n### 3. Swizzling & Vector Math\n\nAccess vector components freely: `vec4 color = vec4(1.0, 0.5, 0.0, 1.0);`\n- `color.rgb` -> `vec3(1.0, 0.5, 0.0)`\n- `color.zyx` -> `vec3(0.0, 0.5, 1.0)` (reordering)\n\n## Examples\n\n### Example 1: Simple Raymarching (SDF Sphere)\n\n```glsl\nfloat sdSphere(vec3 p, float s) {\n    return length(p) - s;\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = (fragCoord - 0.5 * iResolution.xy) \u002F iResolution.y;\n    vec3 ro = vec3(0.0, 0.0, -3.0); \u002F\u002F Ray Origin\n    vec3 rd = normalize(vec3(uv, 1.0)); \u002F\u002F Ray Direction\n    \n    float t = 0.0;\n    for(int i = 0; i \u003C 64; i++) {\n        vec3 p = ro + rd * t;\n        float d = sdSphere(p, 1.0); \u002F\u002F Sphere radius 1.0\n        if(d \u003C 0.001) break;\n        t += d;\n    }\n    \n    vec3 col = vec3(0.0);\n    if(t \u003C 10.0) {\n        vec3 p = ro + rd * t;\n        vec3 normal = normalize(p);\n        col = normal * 0.5 + 0.5; \u002F\u002F Color by normal\n    }\n    \n    fragColor = vec4(col, 1.0);\n}\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `mix()` for linear interpolation instead of manual math.\n- ✅ **Do:** Use `step()` and `smoothstep()` for thresholding and soft edges (avoid `if` branches).\n- ✅ **Do:** Pack data into vectors (`vec4`) to minimize memory access.\n- ❌ **Don't:** Use heavy branching (`if-else`) inside loops if possible; it hurts GPU parallelism.\n- ❌ **Don't:** Calculate constant values inside the shader; pre-calculate them on the CPU (uniforms).\n\n## Troubleshooting\n\n**Problem:** Shader compiles but screen is black.\n**Solution:** Check if `gl_Position.w` is correct (usually 1.0). Check if uniforms are actually being set from the host application. Verify UV coordinates are within [0, 1].\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":24,"source":25,"category":26,"date_added":27,"description":7},"safe","community","finance","2026-02-27","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Ffinance\u002Fshader-programming-glsl","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill shader-programming-glsl",{"tool":40,"command":41},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill shader-programming-glsl",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill shader-programming-glsl","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Ffinance\u002Fshader-programming-glsl\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]