New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Changing znear/zfar

MykeiMykei Posts: 2
edited June 2013 in Support
So In my engine, I handle znear/zfar by creating a projection matrix with my znear/zfar values. Because I'm not using that anymore and using the projection matrices given by StereoConfig, how are we meant to set our clipping planes?

In StereoConfig::updateEyeParams() the znear/zfar values are hardcoded to be 0.01f, 1000.0f. In my OpenGL game this produces a lot of zfighting with things in the distance. I believe this is because the znear value is incredibly small. I'm wondering if there's a reason why this is hardcoded. What are my options? I can just change the values but I don't really want to be messing with the API.


I suppose it's safe to change because this is just a config class and doesn't have to be used - it would be nice to have the clipping plane values changeable though, is this planned?

Comments

  • tlopestlopes Posts: 163
    I also hope that this happens. I personally just modified the SDK to let me pass in the farclip/nearclip values. Thank goodness it's open-source :)
Sign In or Register to comment.