Change cullmode
#2
You are right - culling is disabled when rendering PBR effect. This is not correct.

I will try to fix that tomorrow and prepare a pre-release version for you.

It is also possible to fix that with the current version - you need to use OverrideRasterizerState on the RenderObjectsRenderingStep.

If you are rendering only PBR objects, then you can easily fix that with the following:

DXScene.DefaultRenderObjectsRenderingStep.OverrideRasterizerState = DXScene.DXScene.DXDevice.CommonStates.CullCounterClockwise; // Or use CullClockwise


If you are also rendering objects that require other types of culling, then you would need to create a new RenderObjectsRenderingStep - one with overridden culling and one without. Then you would need to either use FilterRenderingQueuesFunction or FilterObjectsFunction on the RenderObjectsRenderingStep to define which objects are rendered with each RenderObjectsRenderingStep. This is slightly more complicated but DXEngine is flexible enough so it is also possible to achieve that. If you will try to do that and will have any problems, please contact me for more details.
Andrej Benedik
  


Messages In This Thread
Change cullmode - by mange - 04-04-2020, 09:25 PM
RE: Change cullmode - by abenedik - 04-06-2020, 04:11 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)