Near plane adjustment and Z buff issues
by Valador, Inc. · in Torque Game Engine Advanced · 09/20/2005 (9:53 am) · 2 replies
I know I saw this listed somewhere else, but I was unable to find it.
Currently, TSE hardcodes the nearplane to .1. This happens in the function GameProcessCameraQuery(CameraQuery *query).
This value was way to low for my far clip plane and caused me to loose resolution in the z buffer. Since the buffer is not linear, all of the resolution was very close to the camera. This causes all sorts of strange z fighing issues. The one I wanted to solve was the filckering water on the beach.
I solved it by adding the following line to GameProcessCameraQuery:
1000 is the number I remember hearing. Not sure if this figure has changed or not but this seemed to work well for me.
Eric P
Currently, TSE hardcodes the nearplane to .1. This happens in the function GameProcessCameraQuery(CameraQuery *query).
This value was way to low for my far clip plane and caused me to loose resolution in the z buffer. Since the buffer is not linear, all of the resolution was very close to the camera. This causes all sorts of strange z fighing issues. The one I wanted to solve was the filckering water on the beach.
I solved it by adding the following line to GameProcessCameraQuery:
query->nearPlane = query->farPlane/1000.0f;
1000 is the number I remember hearing. Not sure if this figure has changed or not but this seemed to work well for me.
Eric P
Associate Kyle Carter