- Home /
Can Post Effects Be Used With PreviewRenderUtility ?
I have created a custom preview window that inherits from ObjectPreview and uses PreviewRenderUtility for rendering the model.
I can get the preview window to display and render a selected model asset properly.
I also have a post effect that I have created (custom glow effect). I have tested it in play mode and know it works.
When I tried adding the post effect to my custom preview, all I get is a black screen. I have checked everything, and as far as I can tell everything I need for the effect is created and working (Camera, Depth Camera, Materials, Scripts/Components etc).
Can Post Effects Be Used With PreviewRenderUtility ? Or are there issues with displaying post effects in a preview window ?
Update
After checking over the camera and all objects and settings, It seems that the camera function I was using (OnPostRender) for my post effect doesn't work well with the preview window (RenderTexture.Active doesn't seem to give the correct source target in this case). So after moving my post effect work back to OnRenderImage and using the incoming source target, the post effect is now rendering.
However there is another problem I have to address. The post effect in the preview window does not seem to be rendering every frame. When I rotate the model with my mouse, the post effect stays stationary. After I figure it all out, I will post the solution / answer.
Your answer
Follow this Question
Related Questions
Getting the texture from the inspector preview pane 1 Answer
Animation preview window 2 Answers
Editor Menu Item open Window 2 Answers
Game with 2 separate windows 2 Answers
Mecanim Animation Preview Window - Blue and Red arrows? 3 Answers