Hello! I am using an OpenSimplexNoise texture and a sprite to create a "film grain" effect to overlay my game. I am trying to make the noise change seed each frame but I keep stumbling. I have been reading the docs but I can't seem to plug the right value into this. how would you implement the following?

extends Sprite


var rng_ = RandomNumberGenerator.new()

func _process(delta):
	rng_.randomize()
	self.texture.seed = rng_.randi()

Ah, good info. Would like to avoid a performance hit. It also seems like noiseTextures can't be modified the way I want them. It also looks like a shader is an easier option. I'll go that route. Love how I make things complicated for myself. =)

9 days later

Secondly, the RandomNumberGenerator only needs to be called randomize once during initialization, it does not need to be called every frame

4 days later

@vmjcv said: Secondly, the RandomNumberGenerator only needs to be called randomize once during initialization, it does not need to be called every frame

Also good advice. Would be important for me to know this. =)

7 months later