OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

A problem of depth on osgText::Text in programmable pipeline


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
gyw
Newbie


Joined: 09 Jun 2017
Posts: 3
Location: Beijing, China

PostPosted: Mon Jul 10, 2017 7:29 am    Post subject:
A problem of depth on osgText::Text in programmable pipeline
Reply with quote

Hi,

I meet such a problem. I put some text nodes in the scene. And they are all located on the same plane. I set the 'Depth' in order to control their z-order. The result is right at the fixed pipeline version of osg. But at the programmable pipeline, the result is not always right.
I'm using the osg version 3.2.1. But this problem also exist in the latest osg-master, which I get from github.

Thanks for any help!

Thank you!

Cheers,
Yanwei
Back to top
View user's profile Send private message
cbuchner1
Appreciator


Joined: 14 Mar 2012
Posts: 312

PostPosted: Fri Jul 14, 2017 9:44 am    Post subject:
A problem of depth on osgText::Text in programmable pipeline
Reply with quote

I think we need code and screenshots to understand your problem.


I don't know about any "Depth" parameter in OpenGL. I know about a polygonOffset that affects rendering order for triangles located at similar Z buffer depths.


Christian



2017-07-10 9:29 GMT+02:00 Yanwei Guo < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi,

I meet such a problem. I put some text nodes in the scene. And they are all located on the same plane. I set the 'Depth' in order to control their z-order. The result is right at the fixed pipeline version of osg. But at the programmable pipeline, the result is not always right.
  I'm using the osg version 3.2.1. But this problem also exist in the latest osg-master, which I get from github.

  Thanks for any help!

Thank you!

Cheers,
Yanwei

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71110#71110





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
gyw
Newbie


Joined: 09 Jun 2017
Posts: 3
Location: Beijing, China

PostPosted: Fri Jul 14, 2017 12:36 pm    Post subject:
Reply with quote

Hi,
The code is in the attachment.
And the shader files are at end of the code.

TIA.
Back to top
View user's profile Send private message
cbuchner1
Appreciator


Joined: 14 Mar 2012
Posts: 312

PostPosted: Fri Jul 14, 2017 12:59 pm    Post subject:
A problem of depth on osgText::Text in programmable pipeline
Reply with quote

Okay, so you are modifying depth testing by attaching an osg::Depth object to the stateset... which OSG maps to glDepthFunc() glDepthRange() OpenGL API calls.


As you are not modifying gl_FragDepth and not using any fragment discard, the early Z testing would still apply before entering the fragment shader.

But I am not an expert with this, so I will leave it to other people to jump in with possible explanations for any mismatch between fixed function and shader pipeline that you are seeing.

Christian




2017-07-14 14:37 GMT+02:00 Yanwei Guo < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi,
  The code is in the attachment.
  And the shader files are at end of the code.

  TIA.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71275#71275




_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
gyw
Newbie


Joined: 09 Jun 2017
Posts: 3
Location: Beijing, China

PostPosted: Fri Jul 14, 2017 1:21 pm    Post subject:
Reply with quote

Thanks in advance, Christian.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts OsgText compile issue with the newer ... crubel@compro.net General 4 Wed Nov 15, 2017 7:29 pm View latest post
No new posts Osg 3.4.1 - Tutorial 12 Fails on Mac ... digitorus General 1 Sat Nov 04, 2017 12:32 pm View latest post
No new posts Major changes to osgText merged into ... robertosfield General 0 Thu Oct 26, 2017 5:30 pm View latest post
No new posts BVH and model axis centering: a model... Paradox Plugins [osgPlugins] 0 Mon Oct 16, 2017 4:27 pm View latest post
No new posts Problem With Osg Texture Colors! Bobykhani General [forum] 1 Tue Oct 10, 2017 8:20 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP