# SetBlendState in BatchedElements.cpp 

**URL:** <https://forums.unrealengine.com/t/setblendstate-in-batchedelements-cpp/2716510>\
**Category:** Rendering\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [March 5, 2026, 10:42am UTC](https://forums.unrealengine.com/t/setblendstate-in-batchedelements-cpp/2716510 "2026-03-05T10:42:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [March 5, 2026, 10:42am UTC](https://forums.unrealengine.com/t/setblendstate-in-batchedelements-cpp/2716510/1 "2026-03-05T10:42:52Z")

</div>

SetBlendState in BatchedElements.cpp should “Translates a ESimpleElementBlendMode into a RHI state change for rendering a mesh with the blend mode normally”.

However I noticed that it changes the BlendMode argument value when HDR and a few UI cvars are enabled.

I think this should be done in the caller of this SetBlendState and only if the rendering is about UI.

Isn’t this going to change the BlendMode of other non UI canvas rendering?

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [March 9, 2026, 11:27pm UTC](https://forums.unrealengine.com/t/setblendstate-in-batchedelements-cpp/2716510/2 "2026-03-09T23:27:04Z")

</div>

Hi there,

This code was added with DX11 HDR support in UE4 days and is mostly used for debug and editor primitives. I agree we should improve how the BlendMode gets changed for HDR compositing.

Was there a specific use case where you ran into this issue?

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [March 10, 2026, 8:08am UTC](https://forums.unrealengine.com/t/setblendstate-in-batchedelements-cpp/2716510/3 "2026-03-10T08:08:44Z")

</div>

Thanks. Not at the moment, but since I was debugging other blending issues I was trying to understand the related code.

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [March 20, 2026, 6:52pm UTC](https://forums.unrealengine.com/t/setblendstate-in-batchedelements-cpp/2716510/4 "2026-03-20T18:52:15Z")

</div>

Hi Marco,

Apologies for the delay - I’ve created the following issue which should be visible soon [https://issues.unrealengine.com/issue/UE\-370940\](https://issues.unrealengine.com/issue/UE%5C-370940%5C). It’s unlikely this will be a priority in the near term, but if you find cases where this is affecting your project please let us know or feel free to send in a pull request for us to look at that addresses the issue.

[Attachment Removed]
