Hey guys!
Newbie here, have a question.
I need to check if a vertex is a certain color by getting its color from its main texture.
This is what i’m trying to do:
fixed4 tex = tex2Dlod (_MainTex, float4(v.texcoord.xy,0,0)); // Doesn’t return the right color
Any help would be appreciated!
For some more context: This is my code
void vert( inout appdata_full v )
{
#if !defined(SHADER_API_OPENGL)
float4 tex = tex2Dlod (_MainTex, float4(v.texcoord.xy, 0, 0));
#endif
bool test = (tex.r == _ColorT.r)? true:false;
}
In the editor, i change the R value of ColorT. No matter what value i use, the test bool is never true.