blending

Using GL_SRC1_COLOR in glBlendFunc()

孤街浪徒 提交于 2021-02-07 09:59:10
问题 I am using glBindFragDataLocationIndexed() and writing two colors in fragment shader. Following is my code : glBindFragDataLocationIndexed(shader_data.psId, 0, 0, "Frag_Out_Color0"); glBindFragDataLocationIndexed(shader_data.psId, 0, 1, "Frag_Out_Color1"); glActiveTexture ( GL_TEXTURE0 ); LoadTexture(texture1); glBindTexture ( GL_TEXTURE_2D, tex_id1); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA,width, height, 0, GL_RGBA,GL_UNSIGNED_BYTE, texture1_data); glActiveTexture ( GL_TEXTURE1 );

Using GL_SRC1_COLOR in glBlendFunc()

痞子三分冷 提交于 2021-02-07 09:57:56
问题 I am using glBindFragDataLocationIndexed() and writing two colors in fragment shader. Following is my code : glBindFragDataLocationIndexed(shader_data.psId, 0, 0, "Frag_Out_Color0"); glBindFragDataLocationIndexed(shader_data.psId, 0, 1, "Frag_Out_Color1"); glActiveTexture ( GL_TEXTURE0 ); LoadTexture(texture1); glBindTexture ( GL_TEXTURE_2D, tex_id1); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA,width, height, 0, GL_RGBA,GL_UNSIGNED_BYTE, texture1_data); glActiveTexture ( GL_TEXTURE1 );

OpenCV determine area of intersect/overlap

[亡魂溺海] 提交于 2021-02-06 11:10:39
问题 I am creating a stitching program using OpenCV and python and currently am stitching the images well and am now trying to blend them together. The ultimate goal will be to use a graph cut to better stitch them but for now I am just overlapping the images based on their found homography. Here is a photo of my current result when stitching two images. My goal is to determine the area of overlap and put it into a mask that I can apply to the top right image (that is the one on top in terms of

OpenCV determine area of intersect/overlap

 ̄綄美尐妖づ 提交于 2021-02-06 11:09:35
问题 I am creating a stitching program using OpenCV and python and currently am stitching the images well and am now trying to blend them together. The ultimate goal will be to use a graph cut to better stitch them but for now I am just overlapping the images based on their found homography. Here is a photo of my current result when stitching two images. My goal is to determine the area of overlap and put it into a mask that I can apply to the top right image (that is the one on top in terms of

OpenCV determine area of intersect/overlap

南楼画角 提交于 2021-02-06 11:08:56
问题 I am creating a stitching program using OpenCV and python and currently am stitching the images well and am now trying to blend them together. The ultimate goal will be to use a graph cut to better stitch them but for now I am just overlapping the images based on their found homography. Here is a photo of my current result when stitching two images. My goal is to determine the area of overlap and put it into a mask that I can apply to the top right image (that is the one on top in terms of

OpenCV determine area of intersect/overlap

杀马特。学长 韩版系。学妹 提交于 2021-02-06 11:07:40
问题 I am creating a stitching program using OpenCV and python and currently am stitching the images well and am now trying to blend them together. The ultimate goal will be to use a graph cut to better stitch them but for now I am just overlapping the images based on their found homography. Here is a photo of my current result when stitching two images. My goal is to determine the area of overlap and put it into a mask that I can apply to the top right image (that is the one on top in terms of

OpenGL default pipeline alpha blending does not make any sense for the alpha component

ε祈祈猫儿з 提交于 2021-02-04 14:47:07
问题 Q : Is there a way to use the default pipeline to blend the Alpha component properly? Problem : I'm drawing semi-transparent surfaces into a texture, then I want to blit that texture into the main frame back buffer. Normally when you use straightforward alpha blending for transparency or antialiasing, it is to blend color components into the back buffer ( which has no alpha channel by deafult ). However, when blending into a texture that has an alpha component, the usual GL_SRC_ALPHA, GL_ONE

Changing colour of a surface without overwriting transparency [duplicate]

百般思念 提交于 2020-11-25 03:45:18
问题 This question already has answers here : Is it possible to change sprite colours in Pygame? (1 answer) Trying to make sections of sprite change colour, but whole sprite changes instead (1 answer) Closed 17 days ago . I want to change the colour of a rect dynamically during runtime. Currently set_colour is filling all of the pixels of the surface with a single colour value. This works, but an issue arises when a method like set_outline is called, which modifies the transparency of the surface.

Changing colour of a surface without overwriting transparency [duplicate]

牧云@^-^@ 提交于 2020-11-25 03:43:49
问题 This question already has answers here : Is it possible to change sprite colours in Pygame? (1 answer) Trying to make sections of sprite change colour, but whole sprite changes instead (1 answer) Closed 17 days ago . I want to change the colour of a rect dynamically during runtime. Currently set_colour is filling all of the pixels of the surface with a single colour value. This works, but an issue arises when a method like set_outline is called, which modifies the transparency of the surface.

Processing - rendering shapes is too slow

孤者浪人 提交于 2020-06-26 14:00:50
问题 I have been doing a small little project using Processing, and the effect I wanted to achieve was a kind of "mountains" forming and moving, using Perlin Noise with the noise() function, with 2 parameters. I was originally using a image for the background, but for illustrational purposes, I made the background black, and it's basically the same effect. My issue is that I want to have a "history" of the mountains because they should fade away after some time, and so I made a history of PShapes,