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"

What counts as a texture sampler?

What exactly counts as a texture sampler in your shaders? If you use the same image resource multiple times within the same material does each instance sometimes count as it's own sampler? Do samplers nested inside material functions count? I'm asking because I have a rather complex shader set up and by MY reckoning, I've got a lot less texture samplers than what's being reported.

Product Version: Not Selected
more ▼

asked Jun 05 '14 at 01:45 AM in Rendering

avatar image

1.2k 57 67 99

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

1 answer: sort voted first

Hi Hyperloop -

Any time you call a different texture from a Texture Sampler or Texture Object, it counts. If you use the same Texture multiple times, however, it only counts once. Samples even though they are nested in your Function still count toward that materials total count of available texture samplers. Remember however that a blank material will still have 3 samples, this is for lighting information (this assumes the Default Material Setup with Default Lit).

You can keep take of your number by going to the menu bar in the Material Editor and click Window >> Stat and it will display your Instruction Counts and Texture Samples.

Hope that helps you out -

Eric Ketchum

more ▼

answered Jun 05 '14 at 04:23 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

avatar image Kory Jan 31 '15 at 03:19 AM

Does this work for Linux builds too? In windows our shader shows 16 samplers but when building for Linux it complains and says there are 17.

avatar image Hyperloop Jan 31 '15 at 03:56 AM

AFAIK this shader count limit has been raised quite a lot in the interim so it should not be an issue.

avatar image Burnrate Sep 10 '16 at 07:14 PM

But is there a list of things that will count? The DistanceToNearestSurface node uses one. How do textures set to Shared wrap and Shared clamp work? Does clamp and wrap count differently or as seperate?

Where could I read more about these specifics?


(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