lightmap Posted August 11, 2020 Share Posted August 11, 2020 Hello, I'm followed mirror example https://developer.unigine.com/en/docs/2.7.3/code/usage/mirrors_viewports_materials/index?rlang=cpp&words=mirror and find out that all helper geometry, rendered in main window with visualizer, are not showed in mirrors. Is there some flag to enable visualizer for viewport.renderTexture2D() ? way around? Link to comment
rohit.gonsalves Posted August 11, 2020 Share Posted August 11, 2020 Dear @lightmap, I have not run this particular example. But I think following line is doing it. viewport->appendSkipFlags(Viewport::SKIP_POSTEFFECTS); This is important when we use render functionality attached to view port. With every render call we might require to bypass few of the rendering passes from UNIGINE rendering sequence. Due to above optimization the post effects of visualizer drawing will not work as they are skipped. Again the one big mirror is reflected using planar reflection. There is a note too. Planar reflections don't reflect each other and miss post-effects. And if planar reflection don't miss post effects then we will render everything to 10-15 fps. Just a comparative example to make sure that post effects so many times will eat up fps. Are you checking this behavior in editor? Rohit. Link to comment
lightmap Posted August 11, 2020 Author Share Posted August 11, 2020 Thanks, but it not hepls. Im checking not in editor, and not use planar reflection, only renderTexture2D, and SKIP_POSTEFFECTS did not help. Rendered texture still has no visualizer primitives drawn, as in main window scene are. Link to comment
silent Posted August 12, 2020 Share Posted August 12, 2020 SKIP_VISUALIZER flag is set by default when creating a new viepowrt So you need to adjust your viewport constructor and explicitly pass required flags on creation. Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts