0 votes

I'm trying to buil a 2d heat diffusion simulation; I know how to do this in shadertoy by using a shader that takes its own buffer as a texture, but I can't find a way to do this in godot.
To be more clear, what I'm trying to do is make a shader that, given an initial texture that encodes a heat field, computes the next 'frame' of the evolution of the field; I know how to write such a shader, the problem is that I haven't found a way to implement the loop, to feed it a previous 'evaluation' as a texture.
I'm not sure if I'm using the proper terminology here, I'll attach a shadertoy examples by other people to explain the kind of behaviour I'd like to achieve.
example 1
example 2
example 3

Godot version v3.2.3.stable.official
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.