1.6MB Rainy Harbor FPS: Procedural Rendering and Lighting Practices

    This article breaks down a compact first-person shooter built around a rainy shipping harbor, and explains how a build of roughly 1.6MB can still look close to AAA in localized materials, lighting, and atmosphere. It clarifies that the 1.6MB figure refers to the static download package only, then walks through the three levers behind the result: procedural assets that replace data files with generation functions, a deliberately narrow single-scene scope, and reuse of a mature WebGL rendering pipeline. You will also find practical guidance on caching, LOD, instancing, and device fallback; on spending your budget on lighting rather than texture resolution; and an acceptance checklist covering build size accounting, first-frame generation time, frame-rate budgets, memory and VRAM monitoring, and low-end fallbacks.

    Start With the Conclusion

    The “1.6MB” figure here refers to the static download package or static asset footprint. It does not include runtime-generated data, browser or runtime dependencies, cached files, or content the user downloads later.

    The visual target is also specific: this is not a claim of overall parity with a commercial AAA title. It is a claim that within a single rainy harbor scene, on specific hardware at a specific frame rate, the materials, lighting, and atmosphere can approach the realism seen in localized parts of a commercial AAA scene.

    What this article dissects is a small-but-not-cheap-looking FPS case study. Rain, docks, shipping containers, gantry cranes, and cargo ships form the main scene; the player spends a few minutes inside one tightly focused, realistic rainy harbor level. The reason it can hold both small size and visual quality is not画质 compression — it is that the cost was shifted away from “static asset files” and toward “procedural generation rules, rendering pipeline composition, and engineering judgment.”

    1. Where the Small Size Comes From: Asset Form, Scene Scope, and Dependency Reuse

    1.1 Asset form: the denominator moves from “data length” to “description length”

    In traditional games, better visuals mean bigger downloads, because the browser or client reads a pile of data: a 4K texture is easily several megabytes, a mesh model is hundreds of kilobytes, and a sound effect is another audio file. The approach behind projects like this one is “everything is code”: textures, models, and sounds are all generated at runtime by functions. There may be no image, 3D model, or audio recording on disk at all.

    That changes the denominator of the size calculation. A 4K texture can be replaced by a few dozen lines of shader code; a mesh of several hundred kilobytes can be replaced by a constructor of a few kilobytes; a recording can be replaced by real-time synthesis through the browser audio APIs. What the file measures is “description length,” not “data length.” The browser reads only the recipe; the GPU or runtime expands the result.

    Dimension Traditional assets Procedural assets
    Textures 4K bitmap of several MB; scaling requires re-baking A few hundred bytes of shader; scales losslessly
    Models Meshes of hundreds of KB to several MB Geometry from a constructor of a few KB
    Audio Recordings or audio files Real-time synthesis or parametric generation
    Maintenance cost One change may require rebuilding an entire asset bundle Adjust parameters instead, but debugging cost rises
    Generation cost Ready on load First frame requires computation; needs caching or fallbacks
    Suitable subject matter General purpose Rule-based hard surfaces, geometric bodies, mechanical structures

    Take corrugated steel sheet as an example. In a real project it might be several bitmaps; in the procedural implementation it is just a function:

    1. // Dependency note: the code below is example pseudocode, not a built-in
    2. // browser or WebGL API.
    3. // uv: material coordinates; frequency: corrugation frequency; seed: noise seed.
    4. // fbm(): custom fractal noise function; perturbNormal(): custom normal
    5. // perturbation function.
    6. // This snippet depends on UVs, lighting context, normal input, and texture
    7. // sampling capabilities provided by the engine or framework.
    8. float corrugation = cos(uv.x * frequency) * 0.5 + 0.5;
    9. float rust = smoothstep(0.6, 0.9, fbm(uv * 8.0 + seed));
    10. vec3 albedo = mix(vec3(0.35, 0.37, 0.40), vec3(0.45, 0.22, 0.10), rust);
    11. normal = perturbNormal(normal, corrugation);

    A few hundred bytes of shader code can replace several megabytes of textures, and in principle the resolution is unbounded and scaling is lossless. Data assets can hardly do this.

    But boundary conditions matter: procedural generation is not a zero-cost substitution. It adds CPU or GPU computation, and it adds first-frame generation cost. When a scene contains many different materials, complex noise, normal perturbation, and real-time lighting, initial screen generation can slow down, and both memory and VRAM may spike.

    So a real project needs supporting strategies:

    • Caching: Bake some statically generated textures, geometry, or lighting results into intermediate products to reduce repeated computation.
    • LOD: In the distance, reduce noise layers, normal precision, or mesh subdivision.
    • Instancing: Instance repeated objects such as containers, bolts, pipes, and railings to cut draw calls.
    • Fallbacks: On low-end devices, disable high-precision real-time noise, shadows, reflections, or post-processing in favor of simplified versions.

    1.2 A single scene: converging the asset domain

    The entire level has only one visual theme: rain, docks, shipping containers, gantry cranes, cargo ships. Because the scene is convergent, the number of material types is compressed to a few dozen. There is no need for snow, interiors, characters, a second climate zone, complex creatures, or large animation sets.

    Scope itself is the denominator of the size. To a large extent the denominator is decided by design scope, and scope can often be pushed down already at the prompting stage. A constraint like “keep the scope small, like a trimmed level, but make the visuals as realistic as possible” directly limits level duration to a few minutes and limits asset variety to a single theme. The more focused the scope, the smaller the world you have to describe, the fewer assets you need, and the smaller the package.

    1.3 Dependency reuse: introduced once, shared everywhere

    Physically based rendering, exponential distance fog, prefiltered environment map reflections, shadows, post-processing, and spatial audio are already available in mature WebGL rendering frameworks. Introduce them once and reuse them globally.

    Put differently, this kind of project does not invent new rendering technology. It composes capabilities that others have polished over many years and that are relatively stable, and it composes them correctly. That is the key precondition for the small size to hold: you do not have to rebuild the wheel, you only have to assemble existing wheels the right way.

    2. Where the Visual Quality Comes From

    2.1 Perceived quality comes from lighting, reflections, and atmosphere — not resolution alone

    Many people assume “good graphics = crisp textures and high-precision models,” but the real source of visual quality is lighting, reflections, and atmosphere. Wet ground mirroring skylight, distance fading into grey haze, metal surfaces reflecting the environment, rain-slicked highlights along container edges — these impressions come mainly from the interplay of PBR materials, distance fog, prefiltered environment map reflections, and tone mapping.

    The term “AAA feel” should be understood narrowly here. It is not a promise of AAA-scale content, narrative, or character animation. It refers to certain local impressions approaching those of a commercial AAA scene. What determines those impressions is not polygon count or texture resolution but the physical behavior of light. A few kilobytes of geometry with carefully tuned lighting can look better than a high-resolution texture, because the former shapes reflections, roughness, normal direction, and light response, while the latter is only surface pixels.

    2.2 The subject matter sits in the procedural sweet spot

    Procedural generation is very friendly to hard surfaces: shipping containers, gantry cranes, hulls, drones, quadruped robots — all regular, parameterizable geometry that a few loops and parameters can generate accurately and cheaply.

    It is poor for organic subjects: faces, fingers, real animals, and natural vegetation involve large amounts of irregular detail. Procedural generation struggles to make those convincing, and the code volume balloons. So the subject matter of this project happens to land in the sweet spot — not by luck, but by choice. Choosing the right subject matter is the implicit precondition for “small and beautiful” to work at all.

    3. What the Three Pillars Cannot Replace: Human Technical Judgment

    Procedural generation, a mature rendering pipeline, and long-context AI tools solve the problem of how to describe a world efficiently. But which world to describe, which constraints to apply, where to compromise, which qualities must be carried by lighting, and which performance budget must be reserved for frame rate — those decisions still come only from the developer.

    The same toolchain and the same prompts will produce completely different results for different people, because that middle layer of technical judgment cannot be outsourced. The tools are shared; the judgment is private.

    4. Porting This Method to Your Own Project

    If you want to build a “small but striking” interactive 3D scene, you can proceed along these lines:

    4.1 Decide scope first, then talk about visuals

    Converge the scene onto a single theme, a single climate zone, and a few minutes of experience. The smaller the scope, the more controllable the asset volume, material count, and runtime cost.

    4.2 Prefer procedural generation

    Where textures, geometry, or audio can be generated by functions, prefer functions. Hard surfaces, mechanical structures, and industrial settings are especially well suited to procedural generation.

    4.3 Reuse a mature rendering pipeline

    Treat PBR, distance fog, environment reflections, shadows, and post-processing as shared infrastructure. Write only the composition logic yourself; do not rebuild the wheel.

    4.4 Spend the budget on lighting

    To make visuals look “expensive,” tune lighting, reflections, and fog before adding detail density. Tone mapping, exposure, contrast, and fog density often affect the impression more than raising texture resolution.

    4.5 Use AI to raise output, but keep the judgment

    Long-context AI coding tools are well suited to generating and iterating on code over long unattended stretches, and to exploratory, trial-and-error workflows. General capabilities offered by cloud platforms — object storage, container services, logging, and monitoring alerts — can be used to host build artifacts, distribute static assets, and observe runtime behavior. The tools do the writing; you make sure it is written correctly.

    Acceptance and Troubleshooting Checklist

    • Size accounting method: Measure against the compressed final build artifact, and distinguish the static download package, lazy-loaded resources, runtime-generated data, cached files, and external dependencies. Do not count source lines of code alone.
    • First-frame generation time: Measure cold start and time-to-interactive on the target device. Set an explicit budget — for example, completing basic material and lighting generation before first interactive frame on integrated desktop graphics.
    • Frame-rate budget: Define the target frame rate. At 1080p, targeting 60fps gives a CPU frame budget of about 16.6ms; targeting 30fps gives about 33.3ms. You need to cap draw calls, triangle counts, texture sampling, and post-processing passes.
    • Memory and VRAM: Monitor the JS heap, texture memory, geometry buffers, audio buffers, and render target usage separately. Low-memory devices need stricter resource caps.
    • Low-end fallback: Support lowering render resolution, disabling expensive reflections, reducing shadow map precision, cutting noise layers, and turning off real-time generation in favor of pre-baked assets.
    • Common mistakes: Scope creep; subject matter drifting into organic or complex vegetation; piling up code without tuning lighting; ignoring runtime generation cost; having no baseline device; treating procedural generation as zero-cost compression.

    Closing

    The value of a “1.6MB rainy harbor FPS” is not in producing marketing copy. It is in redefining the size problem as a description problem: describe the world with code, control the denominator with scope, guarantee quality with an existing pipeline, raise output with AI, and keep the direction with human judgment. In the era of real-time rendering, what sets the ceiling on your visuals is usually not how much content you loaded, but how deeply you understand how light behaves and how precisely you have constrained the world.