0
\$\begingroup\$

I know a little about shaders, but not much. I cobbled one together to to light my sprites, and it's working great if not for one thing:

enter image description here

I originally tested the shader with a chair texture. I made a new material from that same shader with all different inputs that are distinctly table-shaped, but unity insists on making the clickable area the same shape and position of the original chair. I have no idea why.

When I set the alpha cutoff to zero, it uses the entire quad again. Based on this, I'm guessing somehow the alpha of the original texture is filtering through somehow.

I can set the cutoff to zero for the time being, but I still want to know what's happening if anyone could help me understand

Edit: setting the alpha cutoff to zero makes the display a square again but the clickable area is still the same as the little chair in the corner there:

enter image description here

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The shader had a few inputs marked as [HideInInspector]. When I removed the flag, the _MainTex("BaseMap", 2D) was set to the diffuse chair texture.

Mystery solved.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .