- Home /
How do Camera Clear Flags work in the Universal Render Pipeline?
So, i'm trying to create an effect similar to this one, where stars rotate in the sky leaving star trails behind. My idea was the following:
Add an overlay Camera on top of the Background which render only objects in the "Stars" layer
Create a game object called "Stars" with a 2D sprite of the stars.
Add a script rotating the stars.
Set the CameraClearFlags of the Stars camera as CameraClearFlags.Nothing.
Well, that's what i did. I set up a script with the following:
cam = GetComponent<Camera>();
cam.clearFlags = CameraClearFlags.Nothing;
I of course set this up at the Stars camera and hit play but it did nothing. The stars just rotated normally. I then added the same script to my base camera to see what has happening. Nothing. Nothing even changes. I added to ALL my other cameras and nothing happened again.
It seems that CameraClearFlags are not working in the UR Pipeline. How should i go on about doing this?
I can't tell what the problem is exept the sprites have a outline in the background color or something similar. This would override the pixels with the Start color. To at least give something: You could add trailrenderers to the starts.