Code: Select all
OgreItemPtr->setLightMask(0x0000001);
light->setLightMask(0x000000001);
Code: Select all
OgreItemPtr->setLightMask(0x0000001);
light->setLightMask(0x000000001);
Code: Select all
pass_scene
{
//Render objects and lights that have (mask & 0x00000001) != 0
visibility_mask 0x00000001
}
pass_scene
{
//Render objects and lights that have (mask & 0x00000001) != 0
visibility_mask 0x00000002
//Only work on a subset of RenderQueues to skip from processing a lot of items from the common RQs (assumes you put your Item in RQ ID 2)
rq_first 2
rq_first 3
}
Code: Select all
addWorkspace( SceneManager *sceneManager,
const CompositorChannelVec &externalRenderTargets,
Camera *defaultCam, IdString definitionName, bool bEnabled,
int position=-1, const UavBufferPackedVec *uavBuffers=0,
const ResourceLayoutMap* initialLayouts=0,
const ResourceAccessMap* initialUavAccess=0,
const Vector4 &vpOffsetScale = Vector4::ZERO,
uint8 vpModifierMask=0x00, uint8 executionMask=0xFF );
I don't understand what you mean.Feanor16 wrote:if i understand, that's not possible anymore to change the mask into our code?
I don't know what execution masks have to do with this.Feanor16 wrote: i tried with
editing executionMask when i build my workspace but it doesn't workCode: Select all
addWorkspace( SceneManager *sceneManager, const CompositorChannelVec &externalRenderTargets, Camera *defaultCam, IdString definitionName, bool bEnabled, int position=-1, const UavBufferPackedVec *uavBuffers=0, const ResourceLayoutMap* initialLayouts=0, const ResourceAccessMap* initialUavAccess=0, const Vector4 &vpOffsetScale = Vector4::ZERO, uint8 vpModifierMask=0x00, uint8 executionMask=0xFF );
Code: Select all
viewport->setVisibilityMask(visibility);
Hi! Don't change the viewport's visibility mask, as the compositor will override your changes. It's a sort of hard to remove remnant from 1.x.Feanor16 wrote:Sorry, bad explain. i was looking for use an equivalent ofCode: Select all
viewport->setVisibilityMask(visibility);
but like the lights, it doesn't works
Is it a limitation of Forward+ in general, or just a limitation of current implementation? For example, can we put the lighting mask of objects into the material, and light masks of lights into the global light list, and then we can test it in the pixel shader? Rendering multiple scene passes seem to be troublesome if we have transparent object.dark_sylinc wrote:Yeah, setLightMask won't work with Forward+ (or Deferred if we had it) as this information is lost.
If you're asking if it can be done, yes... it can be done. But doing the mask comparison in the pixel shader will cost performance. If you really need it, then I guess I could implement it and have it globally disabled by default (to save performance to those who don't need the feature).rujialiu wrote:[quote="dark_sylinc"Is it a limitation of Forward+ in general, or just a limitation of current implementation? For example, can we put the lighting mask of objects into the material, and light masks of lights into the global light list, and then we can test it in the pixel shader? Rendering multiple scene passes seem to be troublesome if we have transparent object.
Please do it! We want it *desperately* And at least another user (the original author of this post) is also interested in it too.dark_sylinc wrote: If you're asking if it can be done, yes... it can be done. But doing the mask comparison in the pixel shader will cost performance. If you really need it, then I guess I could implement it and have it globally disabled by default (to save performance to those who don't need the feature).
Code: Select all
render_scene
{
overlay off
visibility_mask 0x0
// shadows DefaultShadowNode
}
render_scene
{
overlay off
// shadows DefaultShadowNode
}
Code: Select all
render_scene
{
overlay off
shadows DefaultShadowNode
}
You've found a bug. Ogre is trying to reuse the culling results from the previous pass when it shouldn't.rujialiu wrote:dark_sylinc wrote: The scene becomes very dark (well, not black because we have PCC and Irradiance Volumes enabled, but turning them off yield a completely black screen). Note that the shadow nodes are commented out. If I enable them, the scene will not be dark, but still can't achieve what I want.
We've tried the fine granularity one. It works perfectly for us with both D3D11 and Metal. Thanks!dark_sylinc wrote:Fine granularity got implemented for all RenderSystems.