Developer Notes

TexCoord, and ScreenPosition material expression now always return ViewportUV, and the Scene Texture expression only take ViewportUV has an input. However the conversion of ViewportUV to BufferUV is done within the SceneTexture expression itself for optimisation opportunities reasons, then using the underlying SceneTextureLookup() HLSL function.

The change from BufferUV to always use ViewportUV instead in material was backward compatible in the material API, most of the content that are not doing any fencyness with a custom material expression still works fine.

AFAIK, we never committed in backward compatibility of shader internals the users can access with a custom material expression. Here the content needs to be updated to convert ViewportUV to BufferUV as FHLSLMaterialTranslator::SceneTextureLookup() does.

The users of Custom nodes need to understand the responsibilities of using one when accessing renderer internals.

Description

This issue does not occur in 4.18.3 but does occur in 4.19 and Main, making this a regression.

Per user:

I suspect there's an issue with custom expressions and sampling coordinates. It appears once a custom expression accesses a scene texture the coordinates are manipulated in some way.

Steps to Reproduce
  1. Open new empty project
  2. Create new Post Process material with Custom Expression as shown in attached screenshot
  3. Create Material Instance from the new material
  4. Add Post Process Volume, set to Unbound, apply MI as PP Material
  5. Open MI, toggle "Broken" Static Switch Parameter, save

Result: Post Process area only fills part of the editor viewport. Resizing viewport squashes and stretches the rendered image rather than uniformly scaling. See attached GIFs comparing behavior from 4.18 to 4.19.

Expected: Post Process effect will apply to entire viewport. Resizing viewport results in uniform scaling of image.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-57416 in the post.

7
Login to Vote

By Design
ComponentUE - Graphics Features
Affects Versions4.194.20
Target Fix4.20
CreatedApr 6, 2018
ResolvedApr 11, 2018
UpdatedApr 27, 2018