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
more ▼

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

avatar image

303 20 24 155

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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:


more ▼

answered Aug 28 '14 at 09:01 AM

avatar image

2.4k 70 43 142

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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