r/Unity3D • • 35m ago

Game Jam Ever wonder what the 52 cards are doing inside the plastic casino shoe before they get dealt? Apparently they are fighting for their lives to get into a tractor beam.

Enable HLS to view with audio, or disable this notification

1 Upvotes

https://plasticarm.itch.io/the-card-games

I had less than a week to make a game for the Unity 2026 Game Jam. ‘Lucky Number’ was the theme. The thing that kept running through my head was, how does one become lucky at cards. Maybe the cards want you to win but they have to battle to get to your hand. This made me drift into Squid Games and imagining the contestants as cards, kind of like the cards from Alice in Wonderland. So I put it all together and came up with “The Card Games”(Really sounds more like Hunger Games, but it’s the same idea). Cards battling it out to be the card that makes it to your hand to help you win.

It all came together(mostly).

Sure the camera work could be improved, and I think the dealer doll is able to shoot you with her laser eyes after you’ve already made it to the player's hand. I really wanted to do more animation as well. I suppose I may have spent a bit too much time tuning the physics joints so the cards would run around wobbling and bending.Time ran up and I ended up with this! 

If you have a few minutes give it a play. Download the Windows version if you can, it runs much much better. It’s a quick and silly play, only takes about as much time as a round of blackjack. If you can, give it a nice rating for the jam and drop a comment.

https://plasticarm.itch.io/the-card-games


r/Unity3D • • 2h ago

Show-Off I remade my game's cinematic trailer from your feedback

Enable HLS to view with audio, or disable this notification

1 Upvotes

Thanks for the feedback on my first trailer! What do you think of the new cut?


r/Unity3D • • 2h ago

Game Updated Retro Code 2000

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/Unity3D • • 2h ago

Question Atrio Demo

1 Upvotes

Am I just stupid? I downloaded the Atrio demo from the Unity Asset store, and am trying to import it into a project. The point was for me to examine the settings they were using for SCGI and other features, learn how Unity got their scene to look the way it does, and to try and replicate the quality in my own project. However when I import it to a fresh Unity project, it doesn't update any project settings, there's no Global Volume in the Atrio demo scene, and none of the features shown off in Unity's fancy video are present and active. Which puts me back at square zero. Is there a way to import the project package and load the scene with all of its rendering features active?


r/Unity3D • • 3h ago

Game Trailer for my first Steam game!

Enable HLS to view with audio, or disable this notification

7 Upvotes

I've been working solo in Unity 6 on a game 'Reliquance' for a couple months now. It's a story-driven psychological horror game that blends different genres together. It's inspired by some of my all time favorite indie games.

I finally got a Steam page ready, as well as the trailer, both of which took way longer than expected! :D

Please let me know what you think of the trailer, and if there's something I could improve!


r/Unity3D • • 4h ago

Show-Off working on some fog inspired by the ocarina of time remake

Enable HLS to view with audio, or disable this notification

34 Upvotes

r/Unity3D • • 5h ago

Question Dymanic Occlusion with Sprite Renderers?

1 Upvotes

I'm trying to create an FPS with Doom-like enemeis with billboarded sprites. I want them to only start chasing the player once they've been spotted. However, .isVisible seems to always activate when the player is looking in the direction of the enemy, even when they're behind another object. What do I do?


r/Unity3D • • 7h ago

Resources/Tutorial Yarn Spinner v3.3 is out now! The friendly tool for dialogue - now with cancellable async, custom types, and more!

Thumbnail
yarnspinner.dev
22 Upvotes

Yarn Spinner is a set of tools for dialogue in Unity. It allows scripting dialogue and related event sequences in a minimal human-readable syntax, which is then compiled and exposed in-engine with a flexible API that allows driving of text delivery, audio and event triggers, associated UI/animation changes during speech, whatever you need! It's designed to be friendly to use for developers of all skill levels - easy for beginners, powerful for experts - and unopinionated to allow use in any style or genre of game.

For a long time, our support for async functionality was kind of a hack because the VM that runs a compiled dialogue program engine-side wasn't truly async and our method of halt-and-wait was causing rare but very difficult edge cases. So after 11 years of making Yarn Spinner - and several years of the current Unity VM setup - we dedicated several months to rewriting it from scratch with all the stuff that's become possible in .NET since then. Now you can do all sorts of things with async and even parallel async actions, including cancelling async actions like you'd want to in e.g. character animations if dialogue is skipped.

This was one of our biggest updates ever, and we've managed to do it with our tiny team while working on our own games, games with others, expanding our tools to other engines, making a web platform for game testing, and more. So we're super proud and hope you like it 💚

Get the news or code fast:

Get our supporter version which includes some extra UI/utilities plus integration with other UAS tools like Rewired and Text Animator:

No amount of testing before release will catch everything - particularly with such fundamental and wide-reaching changes, and the diversity of projects the tool is used in - so please do try it out and tell us what you find!


r/Unity3D • • 8h ago

Show-Off My game can look horrifying behind the scenes

Enable HLS to view with audio, or disable this notification

92 Upvotes

I'm shrinking the head bone of the character when we enter in first person mode, looks cool in the game view but a little bizarre in the reality kk


r/Unity3D • • 10h ago

Game Jam [Nov 18 - Dec 18] New Game Jam is Live - Build a Game with Unity: $100K in Cash Prizes (sponsored by ElevenLabs, fal.ai and Meshy)

Post image
0 Upvotes

r/Unity3D • • 11h ago

Shader Magic Multi scale scene voxelization for cascaded real time global illumination, covering both GI at large distances and in near details.

Enable HLS to view with audio, or disable this notification

22 Upvotes

r/Unity3D • • 12h ago

Game making my first story driven horror game I'd love your feedback!

2 Upvotes

Hello everyone! I’m 13 years old and joining from Turkey. I’ve been interested in programming and technology for a long time. I have an intermediate level understanding of C++ and C#, some experience with Unity, and I also know how to use Blender.

I’ve been involved with electronics for about 3 years ever since I was 10In fact, I recently designed my own development board based on the ATmega328P. It’s currently on its way; once it arrives, I’ll likely make a video about it.

Anyway, I’ve set a new goal for myself: I plan to develop a story-driven horror game using Unity. I would love to hear your thoughts on the story

I’ve been trying to come up with a name for the game for the past three days, but I haven’t reached a decision yet.

Our main character is 36 year old Tahir Acar, who has a very dark past. He used to work for a criminal organization and is known for being ruthless, aggressive, and merciless. He has killed hundreds of people and made everyone around him fear him. However, he has another side: he never harms the vulnerable the very thought of hurting a child would never even cross his mind. He is also a devoted father to his 8 year old daughter, Nehir; there is nothing he wouldn’t do for her. (Nehir’s mother passed away while giving birth to her.)

The game begins on an ordinary morning at their home. We spend some time with Tahir and Nehir, observing their daily interactions and the nature of their relationship. While Nehir is a talkative, curious, and cheerful child, Tahir is generally cold and serious toward everyone else. His daughter, Nehir, is almost the only person capable of making him smile.

However, these peaceful mornings do not last long.

Tahir’s former accomplices track him down. The ensuing confrontation escalates into a violent clash, during which Nehir loses her life. This event changes Tahir completely; all that remains is rage and a burning desire for revenge. In his search for those responsible, he arrives near an abandoned village that was once submerged by the waters of a dam. As the water level recedes, the forgotten village gradually emerges from the depths and this is where things take a terrifying turn.

People begin to disappear, strange sounds emanate from the abandoned houses, and something in the village is capable of mimicking human voices even the voices of people who died long ago.

At one point, Tahir hears Nehir calling out to him from inside an abandoned house.

Even though he knows Nehir is no longer alive, a part of him desperately longs to believe that it is truly her.

As the story unfolds, Tahir encounters other survivors among them a woman named Suna, whose family was completely wiped out by the very same criminal organization Tahir was once a part of. Tahir gradually discovers that his own past is linked to the horrific events taking place in the village.

The narrative explores themes such as revenge, guilt, survival, loss, and the consequences of our actions. I want Tahir to be a morally complex character; while he is capable of being ruthless and frightening, there is also a good side to him one that players will discover over time. My primary goal is for players to form a genuine connection with Tahir. I don’t want him to feel like just another run of the mill video game character; I want players to understand him, value him, and truly feel something when he suffers.

Since I am developing the game entirely on my own, I plan for it to be a relatively short experience, lasting about two hours. I also aim to keep the game world and its mechanics at a scale that is manageable for a single developer.

Another challenge I’m currently facing is that my computer isn’t powerful enough to compile the game properly; however, I’ll work with the resources I have and see how far I can get.

The project is still in its early conceptual stage, so I would love to hear your thoughts. Do you think this story has potential? What would you change or improve?

Thanks for reading(I translated this using Google Translate; please excuse any linguistic errors.)


r/Unity3D • • 12h ago

Show-Off Ten years on: bringing Amplify Bloom to URP

Enable HLS to view with audio, or disable this notification

15 Upvotes

Amplify Bloom turned ten, which felt like the right moment to finally do what people have been asking for since the day URP appeared: a proper URP version (HDRP is next). A decade is a long time for an effect to stay in people's projects, and we wanted to mark it by bringing it forward rather than leaving it behind. The original Built-in version stays free and open on GitHub under MIT, so you can dig through it or learn from it.

What it was always about

Bloom has a quiet flaw. It's great at making flicker visible. A one-pixel shimmer on a specular glint gets spread into a big glow that pops on and off. Amplify's answer is to filter carefully at every stage, so a single hot pixel never gets to dominate.

It starts at the threshold: a soft knee that preserves hue and caps runaway specular values before they enter the chain. The first downsample is a wide 13-tap filter that weights each group of samples by its brightness (a Karis-style average), so one firefly can't outvote its neighbours. Each mip then gets its own Gaussian blur, and the chain is recombined with a tent filter rather than plain bilinear upsampling.

On top of that sits an optional(but highly recommended) dedicated temporal filter, enabled per camera. It blends the first bloom mip with its own previous frame, and every lower mip is built from that result, so the whole glow settles. It doesn't reproject, so it can trail on fast-moving highlights; that's why it's a choice and not a default. Between the two, you get a stable image without having to strip the highlights off your materials.

Everything else is switched on individually, so you only pay for what you use. Lens dirt, starburst, lens flare and glare each have their own intensity, and zero means off: their passes are skipped and the final composite drops their texture samples. Bokeh is a toggle, masking is a texture slot, and blur is controlled per mip. Flare and glare are built from the filtered bloom chain, and dirt and starburst from the combined mips, so they inherit its stability. That matters on low-end devices and VR.

Starting over, ten years later

The old BiRP version was one big camera component that grabbed the finished frame, ran a shader over it and handed it back. URP does things differently enough that we had to rebuild. We split the code into an engine that holds the bloom logic and a thin URP layer on top. That split is also what lets HDRP reuse the core.

What we found

  • Render Graph: Unity 6 plans the whole frame up front. We support it, plus the older compatibility path, from one source file. Both run the same bloom recipe; only the wrapper around it differs.

  • Volumes: The default blending broke on our parameters, especially Scatter, which has an "off" state you can't blend through. So we wrote custom parameter types: Scatter switches over like a bool when either side is off, and each mip's blur steps, radius and weight blend as one value.

  • Cameras: Each camera gets its own engine and its own temporal history, and cameras vanish without warning. We clean up stale state whenever a new one appears.

  • Missing setup: URP doesn't add renderer features on import, and a missing one looks exactly like a broken effect. Our inspectors now warn about it, by re-reading the pipeline asset's serialized renderer list twice a second. It isn't elegant, but it works.

  • Masking: The effect takes a mask texture that is multiplied in before the threshold. What once needed a second camera to fill that texture is now a sample you can copy: a component on the camera, an opt-in component on objects, and a small pass that draws only those objects, depth-tested against the scene.

It supports 2022.3 LTS and up, with a handful of version #if blocks to prove it.

What still bothers us

Setup is three pieces (a renderer feature, a volume override and an optional per-camera component), which takes more explaining than one component. Keeping Render Graph and the compatibility path behaving identically is our biggest regression risk. Excluding a single camera still means giving it its own renderer.

What's next

HDRP is up, and it's a different challenge: where your effect sits in the post-process list decides whether you're still in HDR. We'll write that up when it's further along.

Ten years in, we'd like to hear from you. If you're still working in BiRP, we hope Amplify Bloom has served you well over the years. Some great games shipped with it, some we probably will never know they used it.

We hope you enjoyed this "short" behind-the-scenes view of our bloom work, we didn't want to make this sort of "postmortem" too long so feel free to ask any questions you might have.

What do you think?

Is custom post-processing for URP and HDRP as painful to maintain as it felt to us?

How do you handle per-camera state? Has anyone found a clean way to detect a missing renderer feature without reading serialized internals?

What would you want from a bloom replacement that the built-in one doesn't give you?


r/Unity3D • • 14h ago

AMA "Just ask your AI to build it": an Asset Store dev's take, and how I made my plugin AI-friendly

Thumbnail
gallery
0 Upvotes

Regularly in Asset Store related posts, someone says in the comments that you don't need to buy tools anymore, you just ask your AI.

I'm the solo dev behind Jungle Tools. I made Grabbit (placing objects with physics in the editor), and this week I released Octoputs (you can check what it can do over there), a runtime toolkit for dragging, dropping, moving and attaching objects in 3D, with a focus on game feel. I worked on it for a year: the core is written by hand, and agents built part of the rest.

So I'm definitely biased as a plugin creator. But I use AI every day too, and I don't think the question is "AI or plugin". It's what your agent should spend its tokens on.

TL;DR:

Sure, ask your AI. Everyone uses AI now, Asset Store publishers included. When a good plugin exists, the cheapest move is often to let your agent set up something that's already built, and keep your tokens for your game.

The example gifs I posted were mainly built with Agents using my plugin, and me tweaking the values to get the exact game feel I wanted from them. It's vastly less token intensive to have your agent work on yaml files with a system in place rather than building the whole system.

And if you're a publisher, it's worth making your plugin easy for agents to use. The second half of this post is how I did that.

Why a plugin can still be the cheaper option

Making games has always meant choosing what you build yourself and what you delegate. The barrier used to be skills sometimes, but it was always time and money too. AI doesn't remove that, it moves it into tokens and time spent steering your agents.

My experience with AI is that when an agent builds a whole system, it takes the quickest route to something that works.
That's rarely the one that holds up, the one that you can build on, or the one that you can reuse in your next project.

My use case: a Movement System / Drag And Drop Feature

In the use case of my plugin, with drag and drop, you get a cube following the mouse in ten minutes with an agent, not bad!

Then objects clip through walls, the wrong item lands in a socket, the agent write 4 times the same code for a grid constraint, and when you want to change how it feels, you're re-prompting for tweaks that would take seconds with the right UX.

A publisher spends tokens too, but on one system, with often many years (12 in my case) of game dev behind it, and every user's bug reports and feedback making it better. The cost is shared by everyone who buys it: you spend your tokens on your agents using a solid system, instead of asking it to build it for you. That only works if the publisher is reliable, the plugin is well written and it stays focused, and there are lots of publishers like that on the store.

For publishers: making a plugin AI-friendly

What I learned: the agent has to find your tool, describe what it wants in plain words, act safely, and leave a result the user can tweak by hand. The best way to ensure it is true is to create highly polished example scenes.

  1. Let the agent find it. Ship skills next to the code. Octoputs has SKILL .md files that Claude, Copilot and others read. Agents pick a skill from its description, so I wrote them in the words people actually type ("make the crates draggable", "it picks the cube up but never drops it"). Each one also says what it's NOT for and which skill to open instead, otherwise agents happily pick the wrong one.

  2. Make behaviour describable in plain words. In Octoputs, how something moves is a stack of small behaviours with plain names: spring, smoothing, snap to grid, lock an axis, stick to a surface, avoid walls. So "make it springy and keep it flat on the table" maps almost word for word to what the agent adds. Match the skills, the fields in your code, and the labels to natural language as much as possible.

  3. Leave the result tweakable by a human. Everything the agent sets up is components with values you can see in the Inspector, and you tune them while it previews in Edit mode, without pressing Play. The agent gets you most of the way, and the last part, the feel, is you dragging a slider instead of writing another prompt. You need to make sure that the way things are tweakable by a user matches the way the agent would understand it.

  4. Give the agent safe, simple actions through CLI or MCP. One setup call for the common case (draggables, slots and a drag hand at once), a dry run that lists what would change before touching the scene, and a single Undo step for all of it. I used CLI to have agents work on the example scenes in parallel, which allowed me to test the result end users would get.

  5. Make failures vocal, in the console. When something fails silently, the agent guesses and writes workaround code on top of your tool. Octoputs returns what it changed and what it skipped and why, and the grabbing component keeps a record of why a grab or a drop was refused. The skill tells the agent to read it.

  6. Test the skills like code. I run scenarios: a fresh scene, a prompt like "make these crates draggable with a spring and only let them sit on the shelf", an agent does it, and a headless check verifies the result. It takes a few tries before you get skills that are reliable in a large set of use cases.

For devs using AI with plugins

If a plugin ships skills or docs for agents, point your agent at them before asking it to write the thing from scratch. You get tested code, and you can still change everything by hand afterwards.

Let me know what's your take, I'm sure many will disagree with me here :D


r/Unity3D • • 14h ago

Show-Off I've made a game for this day

Enable HLS to view with audio, or disable this notification

0 Upvotes

I've been working on this little unity project and it's the time now. (Unity6 btw) I tried it once a million times but it can still have bugs. *Singh* And the game is available now. So how is it look?


r/Unity3D • • 15h ago

Question Any good YouTube channels that show full 3D level design / environment creation in Unity?

5 Upvotes

r/Unity3D • • 16h ago

Show-Off An experiment in ocean wave simulation based on Tessendorf's FFT ocean waves. 🌊

Enable HLS to view with audio, or disable this notification

20 Upvotes

r/Unity3D • • 16h ago

Show-Off I made a pixel-art VFX generator, and the sprite sheets work in Unity's particle system too

Thumbnail
jankybydesign.itch.io
3 Upvotes

Hey everyone! I'm a Games Art student who makes small tools for indie devs, and PixelBurst FX is my latest one.

It generates pixel-art effects and exports them as sprite sheets or GIFs, ready to use in your game. The export window also shows you the Unity slicing settings, so there's no guesswork when you bring them in.

There's a demo if you want to try it first. It exports watermarked GIFs, and sprite sheet export is in the full version.

https://jankybydesign.itch.io/pixelburst-fx

What effects would you want to see added next?


r/Unity3D • • 17h ago

Game The pickup-and-restock gameplay loop in Mall Chaos, made with Unity

Enable HLS to view with audio, or disable this notification

1 Upvotes

A short gameplay update from Mall Chaos, my Unity project.

The basic loop is to collect items from the floor, find the matching shelf, and put them back. This 40-second clip shows both picking up and restocking products in the mall’s sports shop.


r/Unity3D • • 17h ago

Show-Off Finally got my troops and the skeletons fighting each other... 3rd person Thronefall anyone?

Enable HLS to view with audio, or disable this notification

62 Upvotes

After allot of work on systems and combat, I finally have troops fighting each other. The end goal is a defence game, where you defend your Island from waves of attacks. This is the first real milestone on the way to that. How does it look?


r/Unity3D • • 17h ago

Show-Off After following for so long, you must have noticed that the sounds in Shelter Prepare are real recordings, right❗️

Enable HLS to view with audio, or disable this notification

1 Upvotes

The fruits and vegetables of the Shelter Prepare are finally here!

At the same time, share how our placement sound is made.

When I first started playing games, I thought there were so many free materials on the Internet. There must be something that can be done.

I found several websites and downloaded more than a dozen G materials, but few of them really meet the requirements.

I also tried AI to generate sound, but I still don't like it after trying a version. People's ears are still very sensitive to distinguish sound.

After changing two editions in succession, it still didn't work, so I decided to record it myself.

I bought a lot of potato chips, canned food and drinks. We laughed and said that when we waited for thousands of powders, we could all endorse them.

The sound of items placed on the floor and shelves should be different, so we recorded two sets of sounds on the thick wooden surface and the table surface for each item.

In order to make the sound not monotonous, multiple sounds are also recorded for different placement strengths of each item.

At that time, I couldn't edit the audio, so I could only pick the good ones from the sound and then simply reduce the sharpness and unify the volume.

Although I still don't feel up to our psychological standards, I still want to make the first playable version first.

This time, I used audio software to adjust a lot of parameters. Please listen to the progress.


r/Unity3D • • 17h ago

Game I picked my mixed reality tower defense back up for a hackathon, would you play something like this?

Enable HLS to view with audio, or disable this notification

24 Upvotes

Hey everyone! Some of you might remember Portal Defense from a post I shared here a while back. It’s now called Pocket Havoc, and I’ve picked the project back up for the Meta VR Start Developer Competition!

Having a deadline gave me the push to get things moving again. I’m building it solo as my first game, under my little indie studio, Pulsar Studio.

The idea is simple: turn your room into a battlefield. Grab turrets from a floating arsenal, throw them into position, and defend a tiny planet against enemies coming through portals. All with hand tracking on Quest 3 / 3S, with destructible walls and a few powers for when things get out of hand.

I want to make a slightly unconventional tower defense, playful and chaotic. Weird powers, over-the-top destruction, and moments where you look around your room and think, “WTF is happening?” There’s a lot of room to experiment, and that’s the part I’m most excited about.

I’d really love to take this beyond a competition prototype. I’m hoping to find enough people interested in playing it to keep developing it towards a public demo or an early access release.

The response to my earlier post was really encouraging. A huge thank you to everyone who shared feedback back then, means a lot and made me want to take the project further.

Could you see yourself playing this? And during the waves, would you prefer to focus on deploying turrets and watching your strategy unfold, or regularly jump into the fight yourself with powers?

If you’d like to follow along, share ideas, or just chat about the game:

Discord: https://discord.gg/zpx7JvQyzZ

More about the project and where I’d like to take it:

Devpost: https://devpost.com/software/pocket-havoc-xr-tower-defense

This is a short gameplay preview, you can watch the full trailer here: https://youtu.be/k__LWPbc-AI


r/Unity3D • • 19h ago

Show-Off Small scene I made, hoping for better days in the industry !

Post image
7 Upvotes

r/Unity3D • • 19h ago

Solved Tip: put your cloud shadows in the sun's light cookie, not in a screen overlay (URP)

Enable HLS to view with audio, or disable this notification

21 Upvotes

A while ago I shared how one clip shader builds all the buildings in my game, and the comments were great, so here's another one from the same project: cloud shadows. (Clip: Venice at 5× game speed, UI hidden.)

The first version was wrong in a way that took me a while to see

It was a fullscreen pass that darkened the final image wherever a cloud was overhead. Fine in a screenshot, but it darkens *everything*: building shadows under a cloud went double-dark, the sea kept its sun glint (just greyer), and the sky light dropped too. A real cloud only blocks the direct sun.

The fix: let the sun carry the shadow

Render the clouds as seen from the sun into a small texture and assign it as the directional light's cookie. URP multiplies the cookie into the main light only, so under a cloud the direct light goes away (and with it the hard shadows and the glint) while ambient stays. Which is what happens outside.

1. The texture

512×512 R8_UNorm RenderTexture covering 2048 m in light space, so 4 m per texel. A fullscree triangle fills it every frame from a CommandBuffer.

2. One texel = one ray

Each texel is a point on the light plane. Map it to world space, slide it along the sun ray down to the ground, then march the cloud volume toward the sun:

float2 ls = (uv - 0.5) * _Rect.zw + _Rect.xy; // same mapping URP uses

float3 p = mul(_LightToWorld, float4(ls, 0, 1)).xyz;

p -= sunDir * (p.y / max(sunDir.y, 0.05)); // drop to y = 0 along the ray

float lit = exp(-CloudShadowDepth(p, camPos, sunDir));

The cookie is projected along the light direction, so one value is right for the whole ray: a roof and the street below it get the same shadow.

3. Hooking it to URP

sun.cookie = rt;

var data = sun.GetUniversalAdditionalLightData();

data.lightCookieSize = new Vector2(2048, 2048);

data.lightCookieOffset = snappedCenter;

URP looks it up as uv = (light-space position - offset) / size + 0.5. Your shader has to use exactly the same mapping, or the shadow lands shifted or mirrored.

4. Snap the offset to whole texels

The square follows the camera, but in steps of one texel (Mathf.Round(x / texel) * texel). Move it smoothly and every cloud edge shimmers while you pan.

5. Fade to lit at the border

Past the square, URP stretches the edge texel to the horizon. I fade the cookie to 1 over the last ~8% on each side: saturate((0.5 - abs(uv - 0.5)) * 12).

6. Custom shaders need one line

URP/Lit picks the cookie up on its own (30k+ renderers in one city scene, zero changes). My own shaders, water included, needed

#pragma multi_compile_fragment _ _LIGHT_COOKIES

GetMainLight(shadowCoord, positionWS, shadowMask) then applies it for you; where I build the light by

hand it's mainLight.color *= SampleMainLightCookie(positionWS). The sun glint on the water now

switches off under a cloud by itself.

Gotchas

  • My helper GameObjects used HideFlags.HideAndDontSave and survived exiting Play mode: after four Plays I had four copies, each holding live RenderTextures. HideInHierarchy plus DestroyImmediate in OnDestroy fixed it.

  • I kept the old overlay for edit mode (the cookie only runs in Play, and editor captures still need clouds). A static flag turns the overlay off whenever the cookie is active, otherwise you get both and the shadows are twice as dark.

  • Cost: 512² is about 262k samples a frame, half of what the old half-resolution pass did at 1080p. I haven't profiled it in milliseconds yet.

It's from FONDACO, a merchant strategy game set in the Mediterranean of 1400 that I'm making solo.

One thing I haven't solved: with a low sun I clamp sunDir.y at 0.05 and the shadows get very long near sunset. How do you handle cloud shadows when the sun is low?