How to check if a texture contains colour, FAST?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
de3000
Posts: 20
Joined: Tue Sep 19, 2006 4:57 pm
Location: South Africa

How to check if a texture contains colour, FAST?

Post by de3000 »

I am trying to handle some projection mapping with photon goodness involved. There are some cases where the texture which I need to project does not contain any colour except black.

At the moment I use glsl reduction to check if there are any pixels with colour in them. I was wondering if anyone knows of a faster way to check if a texture has a colour other than black.
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

faster than a shader? I don't think is possible.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
de3000
Posts: 20
Joined: Tue Sep 19, 2006 4:57 pm
Location: South Africa

Post by de3000 »

Faster in a shader, I still need the shader.
Post Reply