# How to bilinear sample SceneColor texture when texture size and view rect not match exactly?

**URL:** <https://forums.unrealengine.com/t/how-to-bilinear-sample-scenecolor-texture-when-texture-size-and-view-rect-not-match-exactly/2417774>\
**Category:** Rendering\
**Tags:** rendering-system, unreal-engine, question\
**Created:** [March 26, 2025, 1:18am UTC](https://forums.unrealengine.com/t/how-to-bilinear-sample-scenecolor-texture-when-texture-size-and-view-rect-not-match-exactly/2417774 "2025-03-26T01:18:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![2726559668](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2726559668](https://forums.unrealengine.com/u/2726559668)\
**Post date:** [March 26, 2025, 1:18am UTC](https://forums.unrealengine.com/t/how-to-bilinear-sample-scenecolor-texture-when-texture-size-and-view-rect-not-match-exactly/2417774/1 "2025-03-26T01:18:24Z")

</div>

Hi everyone, I want to bilinear sample SceneColor texture used in engine.  
Because of QuantizeSceneBufferSize or some other reasons, at the beginning of PostProcess, the SceneColor texture used by engine may not be exactly the same size as the final texture (in tonemapping, for instance), which means regions at rightmost and bottom may remained black. These black regions will be discarded latter, but they hinders me from bilinear sampling SceneColor texture because the edges will be interpolated with the black regions. Is there any way I can handle this gracefully with RDG? The only solution I have for now is to do a point sample at the region, but this is not graceful.

---

<div class="post-metadata">

**Author:** ![2726559668](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2726559668](https://forums.unrealengine.com/u/2726559668)\
**Post date:** [April 22, 2025, 3:57am UTC](https://forums.unrealengine.com/t/how-to-bilinear-sample-scenecolor-texture-when-texture-size-and-view-rect-not-match-exactly/2417774/2 "2025-04-22T03:57:15Z")

</div>

Oh I realize that a simple clamp on uv can do this trick.
