Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Taking control of Sync() - Object with lower depth is either not showing up at all or its covering up objects

Author
Message
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 7th Oct 2018 21:42 Edited at: 7th Oct 2018 21:43
I am trying to show water on a minimap. I either get no water plane, or only the water plane and no terrain. I am not sure why I am not getting it to display correctly. Appreciate any guidance.


No waterplane code:



only water with no terrain in minimap

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 8th Oct 2018 09:39 Edited at: 8th Oct 2018 09:40
This post has been marked by the post author as the answer.
Theres not a great deal to go on really to find out what your issue is...

It could be that your rendering 3d to a render image but your not rendering to any depth buffer so normal z ordering/occlusion just wont happen. Using -1 will allow a temporary depth buffer to be created.

Also, you seem to be recreating the sprite every time when you could just leave it and not recreate it every frame.

Your code doesnt show whats going on in the sprite shader so it could be that too.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 8th Oct 2018 12:56 Edited at: 8th Oct 2018 13:16
edit: Using SetRenderToImage( minimapRender, -1 ) and drawing the water_plane after the terrain worked.


Thank you so much Bengismo! For some reason I thought the -1 created a depth image. When I read it again I am not sure why I thought that.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-16 13:58:19
Your offset time is: 2024-04-16 13:58:19