Tangent in Matieral
Let me first say, I'm not rendering expert, so I'm hoping this is an easy one.
I'm trying to access the vertex tangent data that I have set in my mesh for my shader.
In Unity I can pull and use this data quite easily with one line of code: float4 tangent : TANGENT;
Is there an Unreal equivalent? I'm using this data to blend four textures, vertex colours, and uv channels.
asked Oct 28 '16 at 06:58 PM in Rendering
You can set the UV channels with the TextureCoordinate nodes, you can adress specific vertex colors with the vertex color node, and with proper use of add's and multiplies you can get rather far.
I dont know if that helps any.
answered Oct 28 '16 at 07:55 PM
Ok, here's the solution I went with. From Luos' comment I went searching for more UV channels. I wasn't properly using the UV channels on my mesh and bumped it up to 8 UV pairs. That allowed me to have the 4 UV channels I wanted and shove a Vec4 into another 2 UVs. I can then pull that data in the shader.
It's a pretty round-about way to get data. It'd be really nice to be able to have any amount of custom data per vertex accessible in the shader.
answered Nov 01 '16 at 03:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here