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"

Problem Adjusting Texture Value in Shader

I'm trying to break a texture down to two separate outputs, one that has only the values from 0 to .5, the other from .5 to 1.

In Photoshop I can accomplish that using levels, by adjusting the values in low and in high separately.

As far as I know, the math for that would be to multiply my input by two and clamp at 1, and for the other one, multiply by two, subtract one, and then clamp.

But the results are far from what I was expecting.

Can someone tell me what I'm doing wrong?

Thanks a lot!

alt text

Product Version: UE 4.10
Tags:
levels.jpg (373.6 kB)
more ▼

asked Mar 17 '16 at 12:31 AM in Using UE4

avatar image

Pedro Toledo
1 1

avatar image Pedro Toledo Mar 17 '16 at 04:39 AM

I did some more tests and it looks like I need to import the image as linear, do my math, and then convert to sRGB in the shader. But I was under the impression that all math was done in linear space, regardless of how the texture was imported... Therefore I could keep my color textures as sRGB. Am I wrong?

alt text

gradient-test.jpg (181.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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