[SOLVED] Is it possible to do what I'm trying to do here?

  • Posts: 315
5 years 6 days ago #1 by Ioxa
I'm trying to scale a texture down by half and then apply a blur to it. The way I have it set up now it blurs and then scales the image but when I try to apply another blur pass it returns a black screen. Can I only apply effects to the buffer image or am I doing something wrong?

Warning: Spoiler! [ Click to expand ]


Ultimately I'd like to pass the already scaled image to the first blur pass or maybe pass the image to another scaled texture. Also, is it possible to upscale an image? When I tried using values < 1 it would cause an error.

Please Log in or Create an account to join the conversation.

  • Posts: 3639
5 years 6 days ago #2 by crosire
Pass Q1 writes to frameTex2D, but at the same time samples from that texture (in GaussianBlurPS2). That's impossible, you can only read or write from/to a texture, but not both at the same time.
A way around would be to create two textures and switch between them (first write to the first, then read from that one while writing to the second, etc.).
The following user(s) said Thank You: Ioxa

Please Log in or Create an account to join the conversation.

  • Posts: 315
5 years 6 days ago #3 by Ioxa
Sweet, it worked! Thanks Crosire, you da man!

Please Log in or Create an account to join the conversation.