# Colored lighting

**URL:** https://discussions.unity.com/t/colored-lighting/361985
**Category:** XR
**Tags:** XR, visionOS, Question
**Created:** [May 25, 2024, 1:32am UTC](https://discussions.unity.com/t/colored-lighting/361985 "2024-05-25T01:32:59Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![AndrzejUnity](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/andrzejunity/32/85212_2.png) [@AndrzejUnity](https://discussions.unity.com/u/AndrzejUnity)
#### Post date: [June 10, 2024, 5:21pm UTC](https://discussions.unity.com/t/colored-lighting/361985/16 "2024-06-10T17:21:18Z")

</div>

> [@ina](#):
>
> hmmm do you have an example lit shader working where IBL works on render texture?

> [@AndrzejUnity](#):
>
> When rendering to RenderTextures, you are using the Unity renderer rather than RealityKit, and will not receive image based lighting. The only option that will work on both RenderTextures and frame buffer rendering is to use shader graphs with the [PolySpatial Lighting](https://docs.unity3d.com/Packages/com.unity.polyspatial.visionos@1.2/manual/PolySpatialLighting.html) node (and colored point/spot/directional lights).

As I said above, there’s no image-based lighting when rendering to RenderTextures, because the image-based lighting comes from RealityKit (and ultimately from the visionOS’s cameras), and RenderTextures are rendered using the Unity renderer.

> [@ina](#):
>
> being new to shader graph i’m also not too sure how to connect polyspatial lighting? do i blend it or directly connect to emission?

That depends on whether you want to replace the image based lighting entirely (use Unlit target, output to Base Color) or add the Unity lighting to the image based lighting (Lit target, use Emission). However, when rendering to a RenderTexture, you will only get the Unity lighting (point/spot/directional/etc.), not the image based lighting.

It’s possible that we could eventually support rendering to a texture using RealityKit’s [RealityRenderer](https://developer.apple.com/documentation/realitykit/realityrenderer), which does provide RealityKit’s image based lighting (though not from the camera–just from an environment map). If you’re interested in that, please request it on our [road map](https://discussions.unity.com/t/unity-visionos-support-roadmap/316686).

---

_[View the full topic](https://discussions.unity.com/t/colored-lighting/361985)._
