Godot_Film_Grain_Shader icon indicating copy to clipboard operation
Godot_Film_Grain_Shader copied to clipboard

I made a simpler alternative for Godot 4

Open unfa opened this issue 2 years ago • 6 comments

Hey! Sorry for putting this here as an issue - I thought it could be nice for people who look it up to also see this.

I've made a similar effect for Godot 4 using visual shader, though I think it looks pretty decent despite being simpler. It's not synthesizing the noise for each frame,, instead it uses a 256x256 pre-generated noise texture. If you'd view the effect at 100% intensity it'd be obvious, but at a small factor it makes sense to use it, the compromise is completely invisible:

image

I'm also simulating the difference in grain size of red, green and blue components of the film and applying offsets to these components making the grain colorful if desired - it can be controlled with a Saturation parameter.

Here you can get the material and a scene with a ColorRect that makes it work: https://codeberg.org/unfa/Bits4Godot4/src/branch/main/Assets/FilmGrain The whole Bits4Godot4 repo is licensed under MIT.

unfa avatar Sep 27 '22 11:09 unfa

👍

(I will keep this open - this whole repo is from times when I had spare time 😩 )

kondelik avatar Sep 27 '22 11:09 kondelik

EDIT: this is no longer true. @unfa created new repository and licence is no longer problem for Ctrl + C and Ctrl + V 😄

~Random googlers, before you go to @unfa FilmGrain and ctrl + c; ctrl + v it in your game, please be aware that above work by @unfa is licenced under GNU affero (AGPL 3.0) * which is toxic - when you use shader from @unfa, you have to licence your game the same way.~

~Also, there is note about "Game Content", which is licensed under Creative Commons Attribution-ShareAlike 4.0 but i dont believe that the shader (which is source code) falls into this category.~

~*: IANAL but thats strange choice: source code must be distributed along with web publication. Wouldnt GPL be better choice?~

kondelik avatar Sep 27 '22 12:09 kondelik

Ah, sorry. I forgot to mention the project licensing. I could relicense this shader under MIT so anybody can copy+paste without hassle.

If there was a Godot 4 asset library I could put it there. I guess I could make a separate repository with MIT-licensed resources that won't limit usage in any way.

The game licensing uses AGPL and not GPL because that requires server-side software to also have source code available.

unfa avatar Sep 27 '22 18:09 unfa

I'm making a new repository licensed under MIT, I'll replace the links and clean up when that's done.

unfa avatar Sep 27 '22 20:09 unfa

@kondelik I've updated the link to a new repo I made that's licensed under MIT: https://codeberg.org/unfa/Bits4Godot4/ Do you want to clean up the comments?

unfa avatar Sep 27 '22 22:09 unfa

@unfa

@kondelik Do you want to clean up the comments?

I think there is no need, I made Edit to my comment.

I will keep this issue open forever, bcs as I said, I dont have time to keep this repo up to date.

kondelik avatar Sep 28 '22 11:09 kondelik