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 Can I Clamp Render Target Values

I'm trying to make a painting tool in a similar way that the Render Target examples has a height map tool. Everything is working fine until I try to erase. I pass a negative value into the power and clamp the output before adding it to my material. This allows me to have 0-1 values and the paint is essentially masked. The problem is that the texture still has larger and smaller values so you can erase a spot multiple times and essentially prevents painting until you get it above that 0 value again. Likewise, painting the same place causes values greater than 1 (making erasing have no effect until reduced bellow 1).

To solve this, I need to take my additive material and add it to the render target then clamp those values after that. I was hoping someone could point me in the direction of where I could do this. If it requires some C++ that's fine as well.

Product Version: UE 4.17
more ▼

asked Jan 16 '18 at 07:09 PM in Rendering

avatar image

2.1k 104 72 163

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

1 answer: sort voted first

Correct way would be using appropriate render target format, designed to store values in 0-1 range.

more ▼

answered Jan 16 '18 at 10:21 PM

avatar image

7.8k 130 31 293

avatar image Justin.Dooley Jan 16 '18 at 10:25 PM

I came to the same conclusion (with your helpt actually) but even setting it to RTF_R8 didn't work.

(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