Hello Johannes,

On 2017-03-08 00:36, Johannes Brunen wrote:
> I'm playing around with the DepthPeelingStage and have written a simple
> example. For that I have taken the testDepthPeeling.cpp and merged it
> with the shaderstoragebufferobject_std430.cpp example. I have done this
> because I would like to have an example that uses transparent and opaque
> geometry and that uses the more elaborate shader code. The example is
> working somehow, but what I do not get right so far, is that the
> transparent geometry is correctly blended with the opaque geometry.

hmm, I haven't written the DepthPeelingStage and don't know its details 
well enough - or rather I don't know it at all

> In extension to the attached example I also added the following code
> lines into the example:
>
> geom1_state->setTransparencyMode(OSG::Material::TransparencyForceTransparent);
> geom6_state->setTransparencyMode(OSG::Material::TransparencyForceTransparent);
>
> This, however does also not bring the desired correct rendering.

I'm afraid I have no idea what that does, I can't recall ever having 
seen a transparency mode enum :(

> Is it even possible to mix opaque and transparent geometry with the
> DepthPeelingStage core or is the stage incomplete with respect to that task?

I guess that is a possibility.

> How do I have to handle the task of differing actions with respect to
> transparency in a stage implementation at all?
>
> How is blending of transparent and opaque rendering performed in the
> common case?

Transparent objects are rendered after opaque ones in back to front 
order (IIRC using the bounding box center).

> Could you please take a look into the example and give me some hint what
> I'm doing wrong here?
>
> Additionally, I have tried to setup the HDR2 stage above of the
> DepthPeeling stage in another example. With that I do not get any
> rendering.  If I replace the HDR2 stage or the DepthPeeling stage by a
> simple Group core I got the expected rendering for the particular stage.
> Do you have any idea what is missing in that scenariowhere both stages
> are active?

Not specifically, sorry. In general I would suspect it has something to 
do with the FBOs/Attachments the stages are rendering into and how they 
perform clearing.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to