[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KRDGW0CTECY2T628MT13VG":3,"skill-same:01M6KRDGW0CTECY2T628MT13VG":78},{"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":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6KRDGW0CTECY2T628MT13VG","rendering-pipeline",null,"Use when choosing a renderer or planning a project's look and frame budget — renderer per platform, lighting strategy and light limits, anti-aliasing, 3D resolution scaling (FSR, MetalFX), SubViewports and render targets, shader stutter, graphics settings menus, and rendering stats","jame581\u002FGodotPrompter","jame581","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21112138?v=4","01M6KR3KEQ9Z30WVJRR2E2ZVXE","Jan Mesarč","01M6KR3KJVRMPDSMASQPBCBVK3",964,"MIT","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Frendering-pipeline\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"rendering","rendering pipeline","pipeline","when","settings","targets","graphics","resolution","stats","shader","lighting","use","frame","strategy","render","renderer","project","planning","platform","scaling","3D","2026-11-10 10:12:30",false,"---\nname: rendering-pipeline\ndescription: Use when choosing a renderer or planning a project's look and frame budget — renderer per platform, lighting strategy and light limits, anti-aliasing, 3D resolution scaling (FSR, MetalFX), SubViewports and render targets, shader stutter, graphics settings menus, and rendering stats\n---\n\n# Rendering Pipeline in Godot 4.3+\n\nProject-level rendering decisions: which renderer runs where, how the lighting is built for it, how edges are smoothed, what resolution 3D renders at, and how to measure the result. All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.\n\nThis skill picks the strategy; **3d-essentials** holds the per-node recipes (materials, light properties, GI setup, fog, decals).\n\n> **Related skills:** **3d-essentials** for materials, lights, environment and GI node setup, **2d-essentials** for 2D lights and shadows, **shader-basics** for post-processing, compositor effects and the Shader Baker, **godot-optimization** for profiling CPU\u002FGPU bottlenecks, **web-export** for the Compatibility-only browser target.\n\n---\n\n## 1. Pick the Renderer First\n\nThe renderer decides which lighting features exist at all, so choose it before building the look.\n\n| Renderer | `rendering_method` | Use for | Missing compared to Forward+ |\n|---|---|---|---|\n| **Forward+** | `forward_plus` | Desktop and console, high-end visuals | — |\n| **Mobile** | `mobile` | Phones, tablets, standalone XR, low-end desktop | SDFGI, VoxelGI, SSAO\u002FSSIL\u002FSSR, volumetric fog, TAA, FSR |\n| **Compatibility** | `gl_compatibility` | Web (the only option there), very old GPUs | Everything Mobile lacks (though SSAO arrives in 4.6), plus FXAA\u002FSMAA and MetalFX; glow is a simplified version |\n\nSet **Project Settings → Rendering → Renderer → Rendering Method**. Platform overrides already exist: `rendering\u002Frenderer\u002Frendering_method.mobile` defaults to `mobile` and `rendering_method.web` to `gl_compatibility`, so one project can run Forward+ on desktop and Mobile on phones — but then **test the look on both**, because effects silently disappear on the lighter renderer.\n\nA settings menu must hide options the running renderer cannot honor. The later sections use this helper:\n\n```gdscript\nfunc is_forward_plus() -> bool:\n    # Godot 4.4+: prefer RenderingServer.get_current_rendering_method(), which also sees\n    # the --rendering-method CLI flag and the automatic fallback on unsupported hardware.\n    return ProjectSettings.get_setting_with_override(\"rendering\u002Frenderer\u002Frendering_method\") == \"forward_plus\"\n```\n\n```csharp\npublic static bool IsForwardPlus()\n{\n    \u002F\u002F Godot 4.4+: prefer RenderingServer.GetCurrentRenderingMethod(), which also sees\n    \u002F\u002F the --rendering-method CLI flag and the automatic fallback on unsupported hardware.\n    return ProjectSettings.GetSettingWithOverride(\"rendering\u002Frenderer\u002Frendering_method\").AsString() == \"forward_plus\";\n}\n```\n\nShort feature table: see the renderer comparison in **3d-essentials** (`references\u002Frenderer-comparison.md`).\n\n---\n\n## 2. Lighting Strategy\n\nDecide where light comes from before placing lights. Baked light is nearly free at runtime on every renderer; real-time GI is Forward+ only.\n\n| Scene | Forward+ | Mobile | Compatibility |\n|---|---|---|---|\n| Static level, fixed sun | LightmapGI + real-time sun shadows | LightmapGI | LightmapGI |\n| Day\u002Fnight cycle, large outdoor | SDFGI | Sky ambient + DirectionalLight3D | Sky ambient + DirectionalLight3D |\n| Small dynamic interiors | VoxelGI | LightmapGI + ReflectionProbes | LightmapGI + ReflectionProbes |\n| Procedural levels (nothing to bake) | SDFGI | Ambient + a few shadowed lights | Ambient + few unshadowed lights |\n\n**Light budgets**\n\n| Renderer | Limit | Setting |\n|---|---|---|\n| Forward+ | 512 clustered elements (omni + spot lights + decals + reflection probes) in view | `rendering\u002Flimits\u002Fcluster_builder\u002Fmax_clustered_elements` |\n| Mobile | 8 omni + 8 spot lights per mesh | — split large meshes so lights don't compete |\n| Compatibility | 8 omni + 8 spot lights per object; 32 renderable lights per type (omni, spot) per frame | `rendering\u002Flimits\u002Fopengl\u002Fmax_lights_per_object`, `max_renderable_lights` |\n\nRules that hold everywhere:\n\n- **Shadows are the expensive part, not lights.** Keep one shadowed `DirectionalLight3D`; turn `shadow_enabled` off on fill lights and small props.\n- **Bake what doesn't move.** Set static lights' `light_bake_mode` to Static so the lightmap carries them and they cost nothing at runtime. Baking needs a Forward+ or Mobile capable editor; the baked result plays on all three renderers.\n- **Fade distant lights** with `distance_fade_enabled` instead of leaving dozens active.\n\nLight and GI node setup: **3d-essentials** (Sections 3 and 5).\n\n---\n\n## 3. Anti-Aliasing\n\n| Method | Cost | Smooths | Renderers | Notes |\n|---|---|---|---|---|\n| MSAA 2×\u002F4×\u002F8× (`msaa_3d`) | Medium–high | Geometry edges | All three | 2× or 4× is usually the sweet spot; no help with shader\u002Ftexture shimmer |\n| FXAA (`screen_space_aa`) | Low | Everything, blurry | Forward+, Mobile | Cheapest whole-image option |\n| SMAA (Godot 4.5+) | Low–medium | Everything, sharper than FXAA | Forward+, Mobile | Tune `rendering\u002Fanti_aliasing\u002Fquality\u002Fsmaa_edge_detection_threshold` |\n| TAA (`use_taa`) | Medium | Everything incl. specular shimmer | Forward+ only | Ghosting on particles and skinned meshes |\n| FSR 2 at scale `1.0` | Medium | Like TAA, sharper | Forward+ only | Set `scaling_3d_mode` to FSR 2 and `scaling_3d_scale = 1.0` |\n\nThe project settings (`rendering\u002Fanti_aliasing\u002Fquality\u002F*`) are read once at startup. To change AA from a settings menu, set the root viewport:\n\n```gdscript\nfunc apply_antialiasing(msaa: Viewport.MSAA, use_fxaa: bool, use_taa: bool) -> void:\n    var vp := get_viewport()\n    vp.msaa_3d = msaa\n    vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_FXAA if use_fxaa else Viewport.SCREEN_SPACE_AA_DISABLED\n    vp.use_taa = use_taa and is_forward_plus()\n```\n\n```csharp\npublic void ApplyAntialiasing(Viewport.Msaa msaa, bool useFxaa, bool useTaa)\n{\n    Viewport vp = GetViewport();\n    vp.Msaa3D = msaa;\n    vp.ScreenSpaceAA = useFxaa ? Viewport.ScreenSpaceAAEnum.Fxaa : Viewport.ScreenSpaceAAEnum.Disabled;\n    vp.UseTaa = useTaa && IsForwardPlus();\n}\n```\n\nSetting an unsupported mode does not crash; Godot ignores it and logs a warning (an editor error on 4.3–4.5). Gate the options in the UI instead. 2D has its own `msaa_2d`, which smooths 2D geometry edges such as lines and polygons.\n\n---\n\n## 4. 3D Resolution Scaling\n\nRender 3D below native resolution and upscale it — the biggest single GPU saving on fill-rate-bound scenes. 2D and UI stay at native resolution.\n\n| `scaling_3d_mode` | Renderers | Notes |\n|---|---|---|\n| Bilinear | All | Also the only mode that supersamples (`scale > 1.0`) |\n| FSR 1 | Forward+ | Spatial upscaler; `rendering\u002Fscaling_3d\u002Ffsr_sharpness` (default `0.2`, lower = sharper) |\n| FSR 2 | Forward+ | Temporal; replaces TAA; best quality per pixel |\n| MetalFX Spatial \u002F Temporal (Godot 4.4+) | Apple Metal: spatial on Forward+\u002FMobile, temporal on Forward+ | Falls back to FSR when unavailable |\n| Nearest (Godot 4.7+) | All | Crisp pixel look; use integer divisors (`0.5`, `0.333`, `0.25`) |\n\nOffer presets rather than a raw slider. These are AMD's FSR 1 scales, which work as well with FSR 2: **Ultra Quality 0.77, Quality 0.67, Balanced 0.59, Performance 0.5**.\n\n```gdscript\nconst FSR_PRESETS := {\"ultra_quality\": 0.77, \"quality\": 0.67, \"balanced\": 0.59, \"performance\": 0.5}\n\n\nfunc apply_upscaling(preset: String) -> void:\n    var vp := get_viewport()\n    if preset == \"native\":\n        vp.scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR\n        vp.scaling_3d_scale = 1.0\n        return\n    vp.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2 if is_forward_plus() else Viewport.SCALING_3D_MODE_BILINEAR\n    vp.scaling_3d_scale = FSR_PRESETS.get(preset, 1.0)\n```\n\n```csharp\nprivate static readonly System.Collections.Generic.Dictionary\u003Cstring, float> FsrPresets = new()\n{\n    { \"ultra_quality\", 0.77f }, { \"quality\", 0.67f }, { \"balanced\", 0.59f }, { \"performance\", 0.5f },\n};\n\npublic void ApplyUpscaling(string preset)\n{\n    Viewport vp = GetViewport();\n    if (preset == \"native\")\n    {\n        vp.Scaling3DMode = Viewport.Scaling3DModeEnum.Bilinear;\n        vp.Scaling3DScale = 1.0f;\n        return;\n    }\n    vp.Scaling3DMode = IsForwardPlus() ? Viewport.Scaling3DModeEnum.Fsr2 : Viewport.Scaling3DModeEnum.Bilinear;\n    vp.Scaling3DScale = FsrPresets.GetValueOrDefault(preset, 1.0f);\n}\n```\n\nLower scales blur textures; on Forward+ and Mobile, Godot lowers the mipmap bias automatically by `log2(scale)` to compensate (plus `-0.5` with TAA).\n\n---\n\n## 5. SubViewports and Render Targets\n\nEach active `SubViewport` is another full render. Set `render_target_update_mode`: `UPDATE_WHEN_VISIBLE` (default; live views), `UPDATE_ONCE` (snapshots), `UPDATE_DISABLED` (pause), `UPDATE_ALWAYS`.\n\n> See [references\u002Fsubviewports.md](references\u002Fsubviewports.md) for UI display, per-viewport settings, and icon capture.\n\n---\n\n## 6. Shader Compilation Stutter\n\nThe first time a material, light combination, or effect is drawn, the GPU pipeline is compiled, which can hitch a frame.\n\n- **Godot 4.4+** compiles pipelines in the background with ubershaders on Forward+ and Mobile, which removes most of this hitching. Projects on 4.3 benefit from upgrading.\n- The **pipeline cache** (`rendering\u002Frendering_device\u002Fpipeline_cache\u002Fenable`, on by default) makes the second launch faster than the first.\n- The **Shader Baker** (Godot 4.5+, export preset option) shortens the first launch on D3D12 and Metal — see **shader-basics** and **export-pipeline**.\n- On Compatibility, and for effects that still hitch, show each material once behind a loading screen (spawn the effect off-camera or at zero scale for a frame).\n\n---\n\n## 7. Measuring\n\nRead rendering stats from `Performance` and switch `Viewport.debug_draw` to see where the cost is.\n\n```gdscript\nfunc _process(_delta: float) -> void:\n    $Stats.text = \"draw calls %d | primitives %d | VRAM %.0f MB\" % [\n        Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME),\n        Performance.get_monitor(Performance.RENDER_TOTAL_PRIMITIVES_IN_FRAME),\n        Performance.get_monitor(Performance.RENDER_VIDEO_MEM_USED) \u002F 1048576.0,\n    ]\n\n\nfunc _unhandled_input(event: InputEvent) -> void:\n    if event.is_action_pressed(\"debug_overdraw\"):\n        var vp := get_viewport()\n        vp.debug_draw = Viewport.DEBUG_DRAW_DISABLED if vp.debug_draw == Viewport.DEBUG_DRAW_OVERDRAW else Viewport.DEBUG_DRAW_OVERDRAW\n```\n\n```csharp\npublic override void _Process(double delta)\n{\n    GetNode\u003CLabel>(\"Stats\").Text = string.Format(\"draw calls {0} | primitives {1} | VRAM {2:F0} MB\",\n        Performance.GetMonitor(Performance.Monitor.RenderTotalDrawCallsInFrame),\n        Performance.GetMonitor(Performance.Monitor.RenderTotalPrimitivesInFrame),\n        Performance.GetMonitor(Performance.Monitor.RenderVideoMemUsed) \u002F 1048576.0);\n}\n\npublic override void _UnhandledInput(InputEvent @event)\n{\n    if (@event.IsActionPressed(\"debug_overdraw\"))\n    {\n        Viewport vp = GetViewport();\n        vp.DebugDraw = vp.DebugDraw == Viewport.DebugDrawEnum.Overdraw ? Viewport.DebugDrawEnum.Disabled : Viewport.DebugDrawEnum.Overdraw;\n    }\n}\n```\n\nUseful `debug_draw` modes: `OVERDRAW` (transparency and particle cost), `UNSHADED` (is it lighting or geometry?), `LIGHTING`, `WIREFRAME` (call `RenderingServer.set_debug_generate_wireframes(true)` before the meshes load). The editor's **Debugger → Visual Profiler** splits GPU time per pass. Profiling method: **godot-optimization**.\n\n---\n\n## 8. Graphics Settings Menu\n\nPlayers expect presets (Low \u002F Medium \u002F High \u002F Ultra) plus individual toggles, saved between sessions. Apply runtime settings to the root viewport, environment toggles to the active `Environment`, and store the choice in a `ConfigFile` under `user:\u002F\u002F`.\n\nFull preset table, apply code, and persistence in GDScript and C#: [references\u002Fgraphics-settings.md](references\u002Fgraphics-settings.md).\n\n---\n\n## 9. Common Pitfalls\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| Effects vanish on phone or web build | Built the look on Forward+, shipped on Mobile\u002FCompatibility | Preview with the target renderer; plan lighting per Section 2 |\n| TAA or FSR option does nothing | Not Forward+ (warning in output) | Gate the option on the running renderer (Section 1 helper) |\n| Changing the AA project setting in game has no effect | Project settings are read at startup | Set the root `Viewport` properties |\n| Lights flicker on and off on Mobile | More than 8 omni or 8 spot lights touch one mesh | Split the mesh, bake static lights, or fade distant lights |\n| Minimap halves the frame rate | SubViewport renders full quality every frame | Lower its size, disable its shadows\u002Feffects, update every few frames |\n| SubViewport looks aliased while the game doesn't | SubViewports don't inherit root AA\u002Fscaling | Set `msaa_3d` \u002F `scaling_3d_*` on the SubViewport |\n| Pixel-art 3D looks smeared | Bilinear upscaling | `SubViewportContainer.stretch_shrink` with nearest texture filter, or Nearest scaling (4.7+) |\n| Hitch the first time an effect plays | Pipeline compilation | Upgrade to 4.4+, pre-warm behind a loading screen |\n\n---\n\n## 10. Checklist\n\n- [ ] Renderer chosen per target platform; `.mobile` \u002F `.web` overrides reviewed\n- [ ] The look is checked on the lightest renderer that ships\n- [ ] Lighting plan written down: what is baked, what is real-time, which lights cast shadows\n- [ ] Light counts within the renderer's budget (512 clustered \u002F 8+8 per mesh on Mobile and Compatibility)\n- [ ] AA method matches the renderer; menu hides unsupported options\n- [ ] 3D resolution scaling offered as presets (FSR 2 on Forward+, bilinear elsewhere)\n- [ ] Every SubViewport has a deliberate update mode, size, and its own AA settings\n- [ ] Draw calls, primitives, and VRAM checked with `Performance` monitors on target hardware\n- [ ] Graphics settings saved to `user:\u002F\u002F` and re-applied on startup\n","# Rendering Pipeline in Godot 4.3+\n\nProject-level rendering decisions: which renderer runs where, how the lighting is built for it, how edges are smoothed, what resolution 3D renders at, and how to measure the result. All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.\n\nThis skill picks the strategy; **3d-essentials** holds the per-node recipes (materials, light properties, GI setup, fog, decals).\n\n> **Related skills:** **3d-essentials** for materials, lights, environment and GI node setup, **2d-essentials** for 2D lights and shadows, **shader-basics** for post-processing, compositor effects and the Shader Baker, **godot-optimization** for profiling CPU\u002FGPU bottlenecks, **web-export** for the Compatibility-only browser target.\n\n---\n\n## 1. Pick the Renderer First\n\nThe renderer decides which lighting features exist at all, so choose it before building the look.\n\n| Renderer | `rendering_method` | Use for | Missing compared to Forward+ |\n|---|---|---|---|\n| **Forward+** | `forward_plus` | Desktop and console, high-end visuals | — |\n| **Mobile** | `mobile` | Phones, tablets, standalone XR, low-end desktop | SDFGI, VoxelGI, SSAO\u002FSSIL\u002FSSR, volumetric fog, TAA, FSR |\n| **Compatibility** | `gl_compatibility` | Web (the only option there), very old GPUs | Everything Mobile lacks (though SSAO arrives in 4.6), plus FXAA\u002FSMAA and MetalFX; glow is a simplified version |\n\nSet **Project Settings → Rendering → Renderer → Rendering Method**. Platform overrides already exist: `rendering\u002Frenderer\u002Frendering_method.mobile` defaults to `mobile` and `rendering_method.web` to `gl_compatibility`, so one project can run Forward+ on desktop and Mobile on phones — but then **test the look on both**, because effects silently disappear on the lighter renderer.\n\nA settings menu must hide options the running renderer cannot honor. The later sections use this helper:\n\n```gdscript\nfunc is_forward_plus() -> bool:\n    # Godot 4.4+: prefer RenderingServer.get_current_rendering_method(), which also sees\n    # the --rendering-method CLI flag and the automatic fallback on unsupported hardware.\n    return ProjectSettings.get_setting_with_override(\"rendering\u002Frenderer\u002Frendering_method\") == \"forward_plus\"\n```\n\n```csharp\npublic static bool IsForwardPlus()\n{\n    \u002F\u002F Godot 4.4+: prefer RenderingServer.GetCurrentRenderingMethod(), which also sees\n    \u002F\u002F the --rendering-method CLI flag and the automatic fallback on unsupported hardware.\n    return ProjectSettings.GetSettingWithOverride(\"rendering\u002Frenderer\u002Frendering_method\").AsString() == \"forward_plus\";\n}\n```\n\nShort feature table: see the renderer comparison in **3d-essentials** (`references\u002Frenderer-comparison.md`).\n\n---\n\n## 2. Lighting Strategy\n\nDecide where light comes from before placing lights. Baked light is nearly free at runtime on every renderer; real-time GI is Forward+ only.\n\n| Scene | Forward+ | Mobile | Compatibility |\n|---|---|---|---|\n| Static level, fixed sun | LightmapGI + real-time sun shadows | LightmapGI | LightmapGI |\n| Day\u002Fnight cycle, large outdoor | SDFGI | Sky ambient + DirectionalLight3D | Sky ambient + DirectionalLight3D |\n| Small dynamic interiors | VoxelGI | LightmapGI + ReflectionProbes | LightmapGI + ReflectionProbes |\n| Procedural levels (nothing to bake) | SDFGI | Ambient + a few shadowed lights | Ambient + few unshadowed lights |\n\n**Light budgets**\n\n| Renderer | Limit | Setting |\n|---|---|---|\n| Forward+ | 512 clustered elements (omni + spot lights + decals + reflection probes) in view | `rendering\u002Flimits\u002Fcluster_builder\u002Fmax_clustered_elements` |\n| Mobile | 8 omni + 8 spot lights per mesh | — split large meshes so lights don't compete |\n| Compatibility | 8 omni + 8 spot lights per object; 32 renderable lights per type (omni, spot) per frame | `rendering\u002Flimits\u002Fopengl\u002Fmax_lights_per_object`, `max_renderable_lights` |\n\nRules that hold everywhere:\n\n- **Shadows are the expensive part, not lights.** Keep one shadowed `DirectionalLight3D`; turn `shadow_enabled` off on fill lights and small props.\n- **Bake what doesn't move.** Set static lights' `light_bake_mode` to Static so the lightmap carries them and they cost nothing at runtime. Baking needs a Forward+ or Mobile capable editor; the baked result plays on all three renderers.\n- **Fade distant lights** with `distance_fade_enabled` instead of leaving dozens active.\n\nLight and GI node setup: **3d-essentials** (Sections 3 and 5).\n\n---\n\n## 3. Anti-Aliasing\n\n| Method | Cost | Smooths | Renderers | Notes |\n|---|---|---|---|---|\n| MSAA 2×\u002F4×\u002F8× (`msaa_3d`) | Medium–high | Geometry edges | All three | 2× or 4× is usually the sweet spot; no help with shader\u002Ftexture shimmer |\n| FXAA (`screen_space_aa`) | Low | Everything, blurry | Forward+, Mobile | Cheapest whole-image option |\n| SMAA (Godot 4.5+) | Low–medium | Everything, sharper than FXAA | Forward+, Mobile | Tune `rendering\u002Fanti_aliasing\u002Fquality\u002Fsmaa_edge_detection_threshold` |\n| TAA (`use_taa`) | Medium | Everything incl. specular shimmer | Forward+ only | Ghosting on particles and skinned meshes |\n| FSR 2 at scale `1.0` | Medium | Like TAA, sharper | Forward+ only | Set `scaling_3d_mode` to FSR 2 and `scaling_3d_scale = 1.0` |\n\nThe project settings (`rendering\u002Fanti_aliasing\u002Fquality\u002F*`) are read once at startup. To change AA from a settings menu, set the root viewport:\n\n```gdscript\nfunc apply_antialiasing(msaa: Viewport.MSAA, use_fxaa: bool, use_taa: bool) -> void:\n    var vp := get_viewport()\n    vp.msaa_3d = msaa\n    vp.screen_space_aa = Viewport.SCREEN_SPACE_AA_FXAA if use_fxaa else Viewport.SCREEN_SPACE_AA_DISABLED\n    vp.use_taa = use_taa and is_forward_plus()\n```\n\n```csharp\npublic void ApplyAntialiasing(Viewport.Msaa msaa, bool useFxaa, bool useTaa)\n{\n    Viewport vp = GetViewport();\n    vp.Msaa3D = msaa;\n    vp.ScreenSpaceAA = useFxaa ? Viewport.ScreenSpaceAAEnum.Fxaa : Viewport.ScreenSpaceAAEnum.Disabled;\n    vp.UseTaa = useTaa && IsForwardPlus();\n}\n```\n\nSetting an unsupported mode does not crash; Godot ignores it and logs a warning (an editor error on 4.3–4.5). Gate the options in the UI instead. 2D has its own `msaa_2d`, which smooths 2D geometry edges such as lines and polygons.\n\n---\n\n## 4. 3D Resolution Scaling\n\nRender 3D below native resolution and upscale it — the biggest single GPU saving on fill-rate-bound scenes. 2D and UI stay at native resolution.\n\n| `scaling_3d_mode` | Renderers | Notes |\n|---|---|---|\n| Bilinear | All | Also the only mode that supersamples (`scale > 1.0`) |\n| FSR 1 | Forward+ | Spatial upscaler; `rendering\u002Fscaling_3d\u002Ffsr_sharpness` (default `0.2`, lower = sharper) |\n| FSR 2 | Forward+ | Temporal; replaces TAA; best quality per pixel |\n| MetalFX Spatial \u002F Temporal (Godot 4.4+) | Apple Metal: spatial on Forward+\u002FMobile, temporal on Forward+ | Falls back to FSR when unavailable |\n| Nearest (Godot 4.7+) | All | Crisp pixel look; use integer divisors (`0.5`, `0.333`, `0.25`) |\n\nOffer presets rather than a raw slider. These are AMD's FSR 1 scales, which work as well with FSR 2: **Ultra Quality 0.77, Quality 0.67, Balanced 0.59, Performance 0.5**.\n\n```gdscript\nconst FSR_PRESETS := {\"ultra_quality\": 0.77, \"quality\": 0.67, \"balanced\": 0.59, \"performance\": 0.5}\n\n\nfunc apply_upscaling(preset: String) -> void:\n    var vp := get_viewport()\n    if preset == \"native\":\n        vp.scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR\n        vp.scaling_3d_scale = 1.0\n        return\n    vp.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2 if is_forward_plus() else Viewport.SCALING_3D_MODE_BILINEAR\n    vp.scaling_3d_scale = FSR_PRESETS.get(preset, 1.0)\n```\n\n```csharp\nprivate static readonly System.Collections.Generic.Dictionary\u003Cstring, float> FsrPresets = new()\n{\n    { \"ultra_quality\", 0.77f }, { \"quality\", 0.67f }, { \"balanced\", 0.59f }, { \"performance\", 0.5f },\n};\n\npublic void ApplyUpscaling(string preset)\n{\n    Viewport vp = GetViewport();\n    if (preset == \"native\")\n    {\n        vp.Scaling3DMode = Viewport.Scaling3DModeEnum.Bilinear;\n        vp.Scaling3DScale = 1.0f;\n        return;\n    }\n    vp.Scaling3DMode = IsForwardPlus() ? Viewport.Scaling3DModeEnum.Fsr2 : Viewport.Scaling3DModeEnum.Bilinear;\n    vp.Scaling3DScale = FsrPresets.GetValueOrDefault(preset, 1.0f);\n}\n```\n\nLower scales blur textures; on Forward+ and Mobile, Godot lowers the mipmap bias automatically by `log2(scale)` to compensate (plus `-0.5` with TAA).\n\n---\n\n## 5. SubViewports and Render Targets\n\nEach active `SubViewport` is another full render. Set `render_target_update_mode`: `UPDATE_WHEN_VISIBLE` (default; live views), `UPDATE_ONCE` (snapshots), `UPDATE_DISABLED` (pause), `UPDATE_ALWAYS`.\n\n> See [references\u002Fsubviewports.md](references\u002Fsubviewports.md) for UI display, per-viewport settings, and icon capture.\n\n---\n\n## 6. Shader Compilation Stutter\n\nThe first time a material, light combination, or effect is drawn, the GPU pipeline is compiled, which can hitch a frame.\n\n- **Godot 4.4+** compiles pipelines in the background with ubershaders on Forward+ and Mobile, which removes most of this hitching. Projects on 4.3 benefit from upgrading.\n- The **pipeline cache** (`rendering\u002Frendering_device\u002Fpipeline_cache\u002Fenable`, on by default) makes the second launch faster than the first.\n- The **Shader Baker** (Godot 4.5+, export preset option) shortens the first launch on D3D12 and Metal — see **shader-basics** and **export-pipeline**.\n- On Compatibility, and for effects that still hitch, show each material once behind a loading screen (spawn the effect off-camera or at zero scale for a frame).\n\n---\n\n## 7. Measuring\n\nRead rendering stats from `Performance` and switch `Viewport.debug_draw` to see where the cost is.\n\n```gdscript\nfunc _process(_delta: float) -> void:\n    $Stats.text = \"draw calls %d | primitives %d | VRAM %.0f MB\" % [\n        Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME),\n        Performance.get_monitor(Performance.RENDER_TOTAL_PRIMITIVES_IN_FRAME),\n        Performance.get_monitor(Performance.RENDER_VIDEO_MEM_USED) \u002F 1048576.0,\n    ]\n\n\nfunc _unhandled_input(event: InputEvent) -> void:\n    if event.is_action_pressed(\"debug_overdraw\"):\n        var vp := get_viewport()\n        vp.debug_draw = Viewport.DEBUG_DRAW_DISABLED if vp.debug_draw == Viewport.DEBUG_DRAW_OVERDRAW else Viewport.DEBUG_DRAW_OVERDRAW\n```\n\n```csharp\npublic override void _Process(double delta)\n{\n    GetNode\u003CLabel>(\"Stats\").Text = string.Format(\"draw calls {0} | primitives {1} | VRAM {2:F0} MB\",\n        Performance.GetMonitor(Performance.Monitor.RenderTotalDrawCallsInFrame),\n        Performance.GetMonitor(Performance.Monitor.RenderTotalPrimitivesInFrame),\n        Performance.GetMonitor(Performance.Monitor.RenderVideoMemUsed) \u002F 1048576.0);\n}\n\npublic override void _UnhandledInput(InputEvent @event)\n{\n    if (@event.IsActionPressed(\"debug_overdraw\"))\n    {\n        Viewport vp = GetViewport();\n        vp.DebugDraw = vp.DebugDraw == Viewport.DebugDrawEnum.Overdraw ? Viewport.DebugDrawEnum.Disabled : Viewport.DebugDrawEnum.Overdraw;\n    }\n}\n```\n\nUseful `debug_draw` modes: `OVERDRAW` (transparency and particle cost), `UNSHADED` (is it lighting or geometry?), `LIGHTING`, `WIREFRAME` (call `RenderingServer.set_debug_generate_wireframes(true)` before the meshes load). The editor's **Debugger → Visual Profiler** splits GPU time per pass. Profiling method: **godot-optimization**.\n\n---\n\n## 8. Graphics Settings Menu\n\nPlayers expect presets (Low \u002F Medium \u002F High \u002F Ultra) plus individual toggles, saved between sessions. Apply runtime settings to the root viewport, environment toggles to the active `Environment`, and store the choice in a `ConfigFile` under `user:\u002F\u002F`.\n\nFull preset table, apply code, and persistence in GDScript and C#: [references\u002Fgraphics-settings.md](references\u002Fgraphics-settings.md).\n\n---\n\n## 9. Common Pitfalls\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| Effects vanish on phone or web build | Built the look on Forward+, shipped on Mobile\u002FCompatibility | Preview with the target renderer; plan lighting per Section 2 |\n| TAA or FSR option does nothing | Not Forward+ (warning in output) | Gate the option on the running renderer (Section 1 helper) |\n| Changing the AA project setting in game has no effect | Project settings are read at startup | Set the root `Viewport` properties |\n| Lights flicker on and off on Mobile | More than 8 omni or 8 spot lights touch one mesh | Split the mesh, bake static lights, or fade distant lights |\n| Minimap halves the frame rate | SubViewport renders full quality every frame | Lower its size, disable its shadows\u002Feffects, update every few frames |\n| SubViewport looks aliased while the game doesn't | SubViewports don't inherit root AA\u002Fscaling | Set `msaa_3d` \u002F `scaling_3d_*` on the SubViewport |\n| Pixel-art 3D looks smeared | Bilinear upscaling | `SubViewportContainer.stretch_shrink` with nearest texture filter, or Nearest scaling (4.7+) |\n| Hitch the first time an effect plays | Pipeline compilation | Upgrade to 4.4+, pre-warm behind a loading screen |\n\n---\n\n## 10. Checklist\n\n- [ ] Renderer chosen per target platform; `.mobile` \u002F `.web` overrides reviewed\n- [ ] The look is checked on the lightest renderer that ships\n- [ ] Lighting plan written down: what is baked, what is real-time, which lights cast shadows\n- [ ] Light counts within the renderer's budget (512 clustered \u002F 8+8 per mesh on Mobile and Compatibility)\n- [ ] AA method matches the renderer; menu hides unsupported options\n- [ ] 3D resolution scaling offered as presets (FSR 2 on Forward+, bilinear elsewhere)\n- [ ] Every SubViewport has a deliberate update mode, size, and its own AA settings\n- [ ] Draw calls, primitives, and VRAM checked with `Performance` monitors on target hardware\n- [ ] Graphics settings saved to `user:\u002F\u002F` and re-applied on startup\n",{"name":5,"description":7},"master","60c28fdc40706a24576731e9fb3508b9c95258ad","skills\u002Frendering-pipeline",63,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter","https:\u002F\u002Fgithub.com\u002Fjame581","https:\u002F\u002Fjanmesarc.online\u002F","Software engineer. My biggest passion is game development.","2026-11-14 20:45:49",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add jame581\u002FGodotPrompter --skill rendering-pipeline",{"tool":60,"command":61},"bunx","bunx skills add jame581\u002FGodotPrompter --skill rendering-pipeline",{"tool":63,"command":64},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill rendering-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Frendering-pipeline\u002FSKILL.md",true,[68,74],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fgraphics-settings.md","REFERENCE","参考文档",8945,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Frendering-pipeline\u002Freferences\u002Fgraphics-settings.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fsubviewports.md",2177,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Frendering-pipeline\u002Freferences\u002Fsubviewports.md",[79,99,120,150,173,191],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":40},"01M6KRFE5BR2PSD08ZKDAS66R7","xr-development","Use when building VR\u002FAR\u002FXR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fxr-development\u002FSKILL.md",[],[86,87,22,88,89,90,91,92,93,94,95,30,96,97,98],"xr development","development","deployment","godot","vr","setup","tracking","godot 4","ar","hand","Meta","applications","quest",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":40},"01M6KRF8GZTG1TAS506MFBSGFC","web-services","Use when a Godot game calls a web server — HTTPRequest, downloads, REST\u002FJSON APIs, auth headers, WebSocketPeer clients, TLS, retries, and keeping secrets out of the build. Not for game networking\u002FRPCs (multiplayer-basics) or browser export (web-export)","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-services\u002FSKILL.md",[],[106,107,108,109,110,111,112,113,30,22,89,114,115,116,117,118,119],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":131,"publishedAt":40},"01M6KRF38Q4WSKAYFS56PG87T0","web-export","Use when shipping a Godot game to the browser — Web export preset options, threads vs no-threads and COOP\u002FCOEP headers, hosting on itch.io or your own server, PWA, JavaScriptBridge, user:\u002F\u002F persistence, audio and input limits, and load size","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-export\u002FSKILL.md",[126],{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[107,132,133,134,135,136,137,138,115,139,140,22,141,142,143,144,145,146,30,147,148,149],"export","web export","threads","limits","shipping","size","options","hosting","input","Coop","preset","browser","game","io","load","pwa","Audio","server",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":164,"publishedAt":40},"01M6KREYFETEBH62ZTN6EZH2X3","using-godot-prompter","Bootstrap skill — establishes how to find and use GodotPrompter skills, with platform-specific tool mapping","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fusing-godot-prompter\u002FSKILL.md",[156,159],{"categoryNo":157,"categoryName":158,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":160,"categoryName":161,"taxonomyType":162,"taxonomyTypeDesc":163},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[89,165,166,167,168,30,169,37,170,171,172],"using godot prompter","find","with","bootstrap","tool","mapping","how","how to",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":40},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation","Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[180,181,30,182,183,184,185,186,187,188,189,22,190],"tween animation","Animation","motion","parallel","gameplay","chaining","ui","recipes","common","implementing","sequences",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":40},"01M6KREKGCQMVDV8WX7HWX8BZG","state-machine","Use when building a state machine or refactoring logic into one — enum, node, and resource-based FSM patterns with trade-offs. Not for adding states to an existing one","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fstate-machine\u002FSKILL.md",[],[198,199,200,89,22,201,202,203,204,205,167,30,189,206],"state","state machine","machine","patterns","node","fsm","state machines","trade","trade-offs"]