- Home /
How do I use a skybox and render texture?
Hello,
I have a camera with a target texture (render texture) and a skybox. The render texture is also assigned to a "Raw Image" UI component.
Trouble is the skybox is not working properly in this setup. It looks as if the the raw image is transparent or something.
What am I doing wrong?
Thanks!
Answer by Nerevar · Sep 22, 2015 at 01:46 PM
Hey @wbl1! I found a solution, you need to add a material (Unlit/Texture) to your RawImage to display the skybox correctly. This might generate some other problems if you use UIMasks but else it works perfectly.
cheers.
Great tip @Nerevar $$anonymous$$y skybox is now rendering properly on my RenderTexture, I now have the issue that you stated where my mask is no longer working since I added a material to my Raw Image. Is there a way you know of to both render the skybox properly while still using a mask to trim the RenderTexture?
Thanks, Ian
Answer by mrstruijk · Apr 26 at 03:43 PM
For if anyone is still looking for this answer in 2022, and using URP: I had some success with setting the shader to the new material to UI/DefaultETC1
Your answer
Follow this Question
Related Questions
Single computing/rendering for complex Skybox shader. 1 Answer
Using Render Textures To Create a Cubemap 0 Answers
Is there any way to do an Unreal-style Skybox? 2 Answers
RenderTexutre to Skybox 2 Answers
Skybox and renderTexture 0 Answers