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"

PostProcess Dynamically Scale Texture to fit screen

I am trying to create a PostProcess Blendable Texture that has a Texture object that blends with the scene. Pretty simple. Below is my Material that usese SceneTexture and blends using a blendfactor before adding the two images.

The issue is I want the texture to tile, exactly once. And right now its cropping the texture. So I expect to see 6x6 checkers but instead only see 2x3

How do I scale my texture so that it will fit the screen. I could guess and check some scale factor but I want to calculate this at runtime so as to support different resolutions and image scales.alt text

alt text

Product Version: UE 4.14
Tags:
material.png (144.7 kB)
screengrab.png (819.1 kB)
more ▼

asked Mar 07 '17 at 08:36 PM in Rendering

avatar image

aspartamed
120 26 35 40

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

1 answer: sort voted first

Hi, Was searching for this myself but I figured it out on my own.

Basically you just search for the ScreenPosition inside the material editor and hook it up to the texture UVS node.

Then set the "Mapping" setting to ViewportUV. The material will now adjust itself to whatever screen resolution you set it to.

more ▼

answered Apr 13 '17 at 10:52 AM

avatar image

Joure
60 3 7 10

(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