- Home /
What is the Dot3 texture combiner supposed to do with the alpha channel?
I can't figure out what it's doing, but whatever it is, it doesn't make sense to me. Here's a simple example:
Shader "Dot3 Primary" {
Properties {_MainTex ("Texture", 2D) = ""}
SubShader{Pass { SetTexture[_MainTex] {Combine primary Dot3 primary, primary} SetTexture[nothing] {Combine previous alpha} }}
}
Why do I see the alpha channel of the texture instead of pure black? Also, why, if I use an actual Color for primary, does something else happen? (It's some kind of multiplication or something.)
Answer by dandeentremont · Jan 10, 2014 at 09:03 PM
Not 100% sure but I believe it's a dot product operation. It treats the 2 colors as vectors and finds the dot product between them. Also, I think it treats 0.5 as "zero" or the "center" in texture combiners.
So...
Color value 0 means -1
Color value 0.5 means 0 (the center point)
And a color of 1 means 1
Your answer
Follow this Question
Related Questions
Building a Custom Shader 1 Answer
Mirror + Shadows shader. 5 Answers
Toon Shader for the iPhone 1 Answer
RimLight Shader 0 Answers
Why do Zwrite, Ztest, and Colormask simplifications not optimize shader performance? 3 Answers