Hey to all,
I was wondering if any kind soul could fill me in on how to create in UDK a Tangent to World function without the need of the blasted node which keeps on killing my vertex colors.
I was scanning some information, and all of them seems to point at at this:
Normal Vector, Binormal Vector, Tangent Vector -> NormalXForm (Input1, Input2, Input3)
Of course, I could be sorely mistaken since in UDK your simply connect the Reflection Vector to the Transform node and make magic happen and I simply was reading information for other engines and such.
Bonus Question: Do the lights in UDK take into account Distance already or not?
Replies
So basically, I'm adding about 10 instruction to my entire shader everytime I need to make a world transform, because I'm subtracting my Reflection node from my Pixel-Reflection or Normal map before feeding it into my Transform node, just so my Vertex Colors can work.
So yeah, a conundrum alright.
So now I am a bit confused...What custom Per-Pixel Reflection map node are you reffing too? Is this something that you wrote in HLSL? Can you try and explain what your end result is and maybe we can come up with a solution / work around.
Short answer to your actual question: kinda.
You'll need to do a matrix multiplication to get the tangent space reflection vector into world space.
the mul(vector,matrix) hlsl function doesn't work in udk's custom node, which means you'll have to do it long hand, as well as construct a tangent to world matrix out of vectors.
The short of it is, you probably could with enough effort, but it would be the same thing as using the transform node and also cost as many or more instructions.