Open danieldiggle opened 3 weeks ago
this won't do a tilt shift or depth of field effect 'cause those need access to depth. like for this effect to work you would need the tree in red to be blurry, but the house in purple to not be blurry.
getting this effect right in 2d is pretty tough; as a filter or effect prefab it would be hard to implement because it would need to resolve depth and then sample depth to mix a blurred version of the frame into a non blurred version of the frame and if youre using room editor depth conventionally it wont work out so well because things can occupy the same depth but be drawn in an unpredictable order. and if youre using depth unconventionally then the depth of field shader would need to know how, which makes it harder to prefab
@attic-stuff Your commentary seems to be based on the idea that the request is for an accurate effect, but really it's for a simple approximation that gives an illusion of a focus-based blur.
Is your feature request related to a problem?
We'd like a new filter/effect that can create a Depth of Field effect, also known as a Tilt-Shift effect. With the right controls it can a huge amount of atmosphere to many 2D games. It's also used heavily in games such as Links Awakenin, Echos of Wisdom, Triangle Strategy and others.
Describe the solution you'd like
A Depth of Field / Tilt-Shift filter/effect - can be imagined as a vignette blur - this would blur either the layer (if used as an effect dropdown) or all layers below (if used Filter/Effect layer). The blur effect would have variables that control The height of both the top and bottom vignette/gradients (which define the masking of the blur from 100% to 0%), then the rotation of the effect and then the strength of the effect. It would want to be attached to the camera.
Another option would be to use a mask/alpha png, to punch out which parts of the layer or layers are being blured. This would allow for more control over the shape of the blurred areas (such as creating an rounded/circular effect).
Below, the unblured scene, then the scene blured as per the above, A, B, C.
Describe alternatives you've considered
No response
Additional context
No response