3d - DirectX 11, Sky dome canges shape while moving -
my issue quite annoying because can't grip on how fix it.
the basic idea created sky sphere rendered , moves camera position. rendering of sky sphere done turning of z buffering , after turning on, , movement of sky done translating world matrix camera position values.
when move camera implicitly sky dome long distances, let's 1000000.0f
units on deptz(z) axis, sky sphere starts change shape... , gets worse longer distances...
i checked see if it's not texture rendering switching on wire-frame, , can see polygons of sphere changing.
anybody having ideas ??? thank you.
as trillian suggests, should render small skydome, centred around camera. procedure this:
- clear colour , depth buffers
- disable depth buffer writes
- render sky dome using camera's rotation not translation view matrix
- re-enable depth buffer writes
- render rest of scene
this way sky behind rest of scene though small , never have issue of walking 'past' sky.
Comments
Post a Comment