As far as I understand the GLDEFS shaders, they're read-only, in that they can't update the source image. I'd like to (try to) make something that continually updates a texture, something like say, Conway's game of life. Is it possible?
If not with shaders, is it possible with ZScript?
Dynamically updating textures -- possible?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
- Posts: 13684
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Dynamically updating textures -- possible?
This will likely require being able to give fragment shaders write access to a texture, directly.
I would wait until Vulkan support is more mature - Graf has made it clear that he wants to wait to do more generalized shader improvements until then.
I would wait until Vulkan support is more mature - Graf has made it clear that he wants to wait to do more generalized shader improvements until then.
-
- Lead GZDoom+Raze Developer
- Posts: 49115
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Dynamically updating textures -- possible?
Writing to a texture with a shader is certainly possible - but it's not this simple. It will require a similar setup like the camera textures or the postprocessing effects that set up a texture as a render target.
The input textures to a shader are immutable objects and cannot be modified.
This also needs to run outside of the main shader, of course.
The input textures to a shader are immutable objects and cannot be modified.
This also needs to run outside of the main shader, of course.