This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hey!
I have a shader that generates a very nice "fog" effect. I also have a number of 2D lights in my scene. I would like to be able to, in the fog shader, set a fragment alpha based on how close it is to a light source. The closer the source, the more transparent it becomes... simulating the light burning the fog away.
I noticed I can use light(){} in the fragment shader, but, as the name implies, it only effects the lighting of the fog. I cannot seem to affect the alpha of the fragment with the light(){} function. Conversely, there doesn't seem to be a way for me to obtain the light information from within the fragment(){} functions.
Again... this is for 2D, not 3D.
Is there something I'm missing, or is this just not possible with Godot at present?
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/godot/comme...