Artur D
Artur D

Reputation: 109

Is it possible to make dark "light" in unity?

This quiestion may be dumb, but is there a way to create a pointlight in unity2d that darkens instead of producing light? I'm using URP by the way.

Upvotes: 3

Views: 3702

Answers (3)

Thomas Fritz
Thomas Fritz

Reputation: 340

This is possible in URP's 2D renderer, but you have to dedicate one of your four blend styles to just negative light:

  1. Create or locate your URP Render Data Asset in your Assets directory.
  2. Choose a Blend Style that you are sure is not being used in your project, rename it to something like "Negative Light".
  3. Change its Blend Mode to "Custom".
  4. Under "Custom Blend Factors", change "Multiplicative" from 1 to -1.

Example of a Blend Style which creates negative light

To make a 2D light source emit darkness, just change its blend style to the one you just created.

Example of a negative 2D point light

Upvotes: 1

George Carlin
George Carlin

Reputation: 447

Use Freeform Light, Check alpha blend on overlap, change the color to black.

Upvotes: 1

Baby_Boy
Baby_Boy

Reputation: 346

Click the Fog Colour box, set the ambient light to 29 on each of the RGB sliders. You can see the change in the scene, pick a colour that is dark but not pitch-black. Click the Ambient Light Colour box, set the ambient light to 51 on each of the RGB sliders. You can see the change in the scene.

Upvotes: 1

Related Questions