Replies: 1 comment 3 replies
-
Basically I want to make that image look red when the position of the image on the target image has red color values on it. I want to keep the original shape of the image, but maybe give it a background color and the alpha channels will make it appear red. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a program that recreates an image from other images using evolution. I want to calculate the average rgba-value of the area of a random object on the target image inside a fragment shader. Basically check the average color value underneath the object. I also don't want to render these objects to the screen. I need the average color value to be calculated inside the fragment shader and I also want to give the image that color. However, I don't know if that is even possible and how one would do that. Any help is appreciated!
Here is an example image of an object:

Here is my current shader.wgsl file (basically copied from the wgpu tutorial):

Beta Was this translation helpful? Give feedback.
All reactions