开发者

Use shaders to compare images

Do you know how can I write simple shader (hlsl) to compare two images ? I want to get on result percent of similarity ? Is it posible to use shaders in this case ? Can I for example count red pixels on im开发者_如何学Pythonage with shaders ?


It can be done simply by passing two textures to a shader and then running a pixel by pixel comparison in the pixel shader. Though it would take really long to compare the two images, the shader should give you an output image showing the difference!

But, if you want an output number representing the percentage difference, you should just run the comparison on the CPU!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜