# Can materials sample from 2-channel (PF\_R8G8) textures?

**URL:** <https://forums.unrealengine.com/t/can-materials-sample-from-2-channel-pf_r8g8-textures/71458>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [August 14, 2016, 2:51pm UTC](https://forums.unrealengine.com/t/can-materials-sample-from-2-channel-pf_r8g8-textures/71458 "2016-08-14T14:51:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [August 14, 2016, 2:51pm UTC](https://forums.unrealengine.com/t/can-materials-sample-from-2-channel-pf_r8g8-textures/71458/1 "2016-08-14T14:51:36Z")

</div>

I’m working on a simplified foliage collision system, very similar to Uncharted 4’s one.

The system basically involves writing ‘Impulses’ to a normal map, and extracting that normal map for WPO in the shader. At the moment I’m using a 4-channel (RGBA) texture but this seems kind of wasteful, given that I only care about the R and G components and am iterating over twice as much data in some cases.

Is it possible for Materials to read from 2-channel texture formats (PF\_R8G8 in the engine, or even PF\_V8U8), or am I wasting my time with this and just have to suck up the cost? Working with Binary / Launcher build btw.

EDIT: Well, seems as though they can. I’m writing pixel data without any issues by the looks of it and UMG can read this in a material. Cool stuff!

---

<div class="post-metadata">

**Author:** ![Wilkes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wilkes](https://forums.unrealengine.com/u/Wilkes)\
**Post date:** [August 14, 2016, 10:59pm UTC](https://forums.unrealengine.com/t/can-materials-sample-from-2-channel-pf_r8g8-textures/71458/2 "2016-08-14T22:59:18Z")

</div>

Make sure you release it on marketplace when you’re done, I’d kill for Uncharted 4’s vegetation collision!
