Fixed various bugs and crashes and moved more functionality into the world editor

This commit is contained in:
Aruki
2017-02-13 13:44:02 -07:00
parent 00a48e69f8
commit c5de322ac7
13 changed files with 105 additions and 148 deletions

View File

@@ -22,7 +22,7 @@ void main()
const float kMaxDepth = 75.0; // Controls the max depth range that kDepthTintNear and kDepthTintFar are interpolated between
const float kDepthTintNear = 0.0; // Sets the pixel color offset for pixels close to the screen
const float kDepthTintFar = -0.2; // Sets the pixel color offset for pixels far from the screen
const float kDepthCurveFactor = 2; // Controls the strength of the interpolation curve (higher = color chabges faster from up close and slower from further away)
const float kDepthCurveFactor = 2; // Controls the strength of the interpolation curve (higher = color changes faster from up close and slower from further away)
// Apply some fake fog so pixels closer to the camera appear slightly brighter
float Depth = ( (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far) / (gl_DepthRange.far - gl_DepthRange.near) ) / gl_FragCoord.w;