Hi Carsten,
the patches didn't seem to work... any hints yet?
Thanks
On Thu, Jul 8, 2010 at 12:34 PM, Carsten Neumann <carsten_neum...@gmx.net>wrote:
> Hello Pablo,
>
>
> Pablo Carneiro Elias wrote:
>
>> I'm drawing a cloud of transparent object and I use a shader to perform
>> some calculations over this cloud. I discovered that OpenSG turns off Z
>> Write for transparent objects by default. This is ok since they will be
>> ordered in Z, but sub elements within the same object geometry are drawed in
>> a wrong way.. Plus, I need Z valus to perform many calculations within my
>> shader code... I 've tried to enable Z Write using RenderOptions like below:
>>
>> OSG::RenderOptionsUnrecPtr options =
>> OSG::RenderOptions::create();
>> options->setZWriteTrans( true );
>> options->activate( _renderAction );
>>
>> where _renderAction is a pointer to RenderAction.
>>
>
> hm, RenderOptions is lacking a lot of option setting code in activate(), it
> might have been forgotten to finish.
>
> Gerrit: Is this just an overlooked piece from the RenderAction rework or
> was there another plan for RenderOptions? If it was just forgotten I'll put
> the option setting code back in, ok?
>
> Also there is currently no way to set the _bZWriteTrans value of the
> RenderPartition, that looks like a simple omission as well (fixed by the
> attached patch)?
>
>
> It doesn't work at all. I've tried also to place a ChunkOverrideNode with
>> a DepthChunk, but it didn't yield results...
>>
>
> This should have worked, but there is bug hiding [1]. The attached patch
> (fix.state.tracking.diff) should fix it, but it is untested.
>
>
> How can I turn on Z Write for transparent objects?
>>
>
> With the attached patch (add.zwritetrans.option.diff) you can enable it
> with RenderAction::setZWriteTrans(true).
>
> Cheers,
> Carsten
>
> [1] When going from opaque to transparent objects the last opaque state is
> kept active, but then a call to glDepthMask(false) is being made to disable
> depth writes for transparent objects. The state tracking does not know about
> this happening and therefore has no reason to re-apply the override.
> I guess we can just call _oDrawEnv.deactivateState() before starting to
> render transparent objects?
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users