x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to pass a float3 to a customized uv?

I need to convert a vector form world space to tangent space in an unlit material. I realized I can save a few instructions by performing the conversion in the vertex shader and pass the result using customized UVs, but seems the TexCoord nodes only outputs float2 values so I cannot pass float3 vectors from the vertex shader to the fragment shader. Is there any way to use float3 (or even float4) texture coordinates?

Product Version: Not Selected
Tags:
more ▼

asked Aug 15 '14 at 01:26 PM in Rendering

avatar image

pedro_clericuzzi
298 19 24 154

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Everything you want can be done, but not within the material editor. There is no vertex to fragment struct access in the material editor. Everything happens in the fragment shader, except for whatever you do in the world position offset. So you would have to dive into the shader code. Here is a good starting point:

https://docs.unrealengine.com/latest/INT/Programming/Rendering/ShaderDevelopment/index.html

more ▼

answered Aug 28 '14 at 09:01 AM

avatar image

Roel
2.4k 67 41 141

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question