Permalink
Browse files

Revert "Fix tiled depth map sampling in depthtile2_fp.glsl"

This reverts commit cbe4a87.

There was actually no problem here, and this change causes issues.
  • Loading branch information...
cmf028 committed Mar 12, 2016
1 parent 7dedb9d commit 4f7830e210a08c69e4f59574c2529e3d7f50b4d3
Showing with 43 additions and 43 deletions.
  1. +42 −42 daemon/src/engine/renderer/shaders.cpp
  2. +1 −1 main/glsl/depthtile2_fp.glsl
@@ -2530,48 +2530,48 @@ const char depthtile2_fp[] = {
0x09, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20,
0x76, 0x65, 0x63, 0x32, 0x20, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x67, 0x6c,
0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x73,
0x74, 0x20, 0x2a, 0x20, 0x34, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x70, 0x69,
0x78, 0x65, 0x6c, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x3b, 0x0a, 0x20, 0x20,
0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x3b, 0x0a,
0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d,
0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x20, 0x30, 0x2e, 0x30,
0x2c, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39, 0x2e, 0x30, 0x2c, 0x20, 0x30,
0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x20, 0x29, 0x3b, 0x0a, 0x20,
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x20, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x66,
0x6f, 0x72, 0x28, 0x20, 0x78, 0x20, 0x3d, 0x20, 0x2d, 0x31, 0x2e, 0x35,
0x3b, 0x20, 0x78, 0x20, 0x3c, 0x20, 0x32, 0x2e, 0x30, 0x3b, 0x20, 0x78,
0x20, 0x2b, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x29, 0x20, 0x7b, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x28, 0x20, 0x79, 0x20, 0x3d,
0x20, 0x2d, 0x31, 0x2e, 0x35, 0x3b, 0x20, 0x79, 0x20, 0x3c, 0x20, 0x32,
0x2e, 0x30, 0x3b, 0x20, 0x79, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x2e, 0x30,
0x20, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76,
0x65, 0x63, 0x34, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x74,
0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x20, 0x75, 0x5f,
0x44, 0x65, 0x70, 0x74, 0x68, 0x4d, 0x61, 0x70, 0x2c, 0x20, 0x73, 0x74,
0x20, 0x2b, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x78, 0x2c, 0x20, 0x79,
0x29, 0x20, 0x2a, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x53, 0x63, 0x61,
0x6c, 0x65, 0x20, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x69, 0x66, 0x28, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x79, 0x20, 0x3c,
0x20, 0x39, 0x39, 0x39, 0x39, 0x39, 0x2e, 0x30, 0x20, 0x29, 0x20, 0x7b,
0x0a, 0x09, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x78, 0x20, 0x3d, 0x20,
0x6d, 0x61, 0x78, 0x28, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x78,
0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x78, 0x20, 0x29, 0x3b, 0x0a,
0x09, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x6d,
0x69, 0x6e, 0x28, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x79, 0x2c,
0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x79, 0x20, 0x29, 0x3b, 0x0a, 0x09,
0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x7a, 0x77, 0x20, 0x2b, 0x3d, 0x20,
0x64, 0x61, 0x74, 0x61, 0x2e, 0x7a, 0x77, 0x3b, 0x0a, 0x09, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x28,
0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x31, 0x2e,
0x30, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x63,
0x63, 0x75, 0x6d, 0x2e, 0x7a, 0x77, 0x20, 0x2a, 0x3d, 0x20, 0x31, 0x2e,
0x30, 0x20, 0x2f, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x0a, 0x20,
0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61,
0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x61, 0x63, 0x63,
0x75, 0x6d, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
0x74, 0x20, 0x2a, 0x20, 0x31, 0x36, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x70,
0x69, 0x78, 0x65, 0x6c, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x3b, 0x0a, 0x20,
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x3b,
0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x63, 0x63, 0x75,
0x6d, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x20, 0x30, 0x2e,
0x30, 0x2c, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39, 0x2e, 0x30, 0x2c, 0x20,
0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x20, 0x29, 0x3b, 0x0a,
0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
0x66, 0x6f, 0x72, 0x28, 0x20, 0x78, 0x20, 0x3d, 0x20, 0x2d, 0x31, 0x2e,
0x35, 0x3b, 0x20, 0x78, 0x20, 0x3c, 0x20, 0x32, 0x2e, 0x30, 0x3b, 0x20,
0x78, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x29, 0x20, 0x7b,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x28, 0x20, 0x79, 0x20,
0x3d, 0x20, 0x2d, 0x31, 0x2e, 0x35, 0x3b, 0x20, 0x79, 0x20, 0x3c, 0x20,
0x32, 0x2e, 0x30, 0x3b, 0x20, 0x79, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x2e,
0x30, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x76, 0x65, 0x63, 0x34, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20,
0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x20, 0x75,
0x5f, 0x44, 0x65, 0x70, 0x74, 0x68, 0x4d, 0x61, 0x70, 0x2c, 0x20, 0x73,
0x74, 0x20, 0x2b, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x78, 0x2c, 0x20,
0x79, 0x29, 0x20, 0x2a, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x53, 0x63,
0x61, 0x6c, 0x65, 0x20, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x69, 0x66, 0x28, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x79, 0x20,
0x3c, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39, 0x2e, 0x30, 0x20, 0x29, 0x20,
0x7b, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x78, 0x20, 0x3d,
0x20, 0x6d, 0x61, 0x78, 0x28, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e,
0x78, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x78, 0x20, 0x29, 0x3b,
0x0a, 0x09, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x79, 0x20, 0x3d, 0x20,
0x6d, 0x69, 0x6e, 0x28, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x79,
0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x79, 0x20, 0x29, 0x3b, 0x0a,
0x09, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x2e, 0x7a, 0x77, 0x20, 0x2b, 0x3d,
0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x7a, 0x77, 0x3b, 0x0a, 0x09, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x69, 0x66,
0x28, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x31,
0x2e, 0x30, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61,
0x63, 0x63, 0x75, 0x6d, 0x2e, 0x7a, 0x77, 0x20, 0x2a, 0x3d, 0x20, 0x31,
0x2e, 0x30, 0x20, 0x2f, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x0a,
0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72,
0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x61, 0x63,
0x63, 0x75, 0x6d, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
};
const char depthtile2_vp[] = {
0x2f, 0x2a, 0x0a, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
@@ -28,7 +28,7 @@ const vec2 pixelScale = r_FBufScale * r_NPOTScale;
void main()
{
vec2 st = gl_FragCoord.st * 4.0 * pixelScale;
vec2 st = gl_FragCoord.st * 16.0 * pixelScale;
float x, y;
vec4 accum = vec4( 0.0, 99999.0, 0.0, 0.0 );
float count = 0.0;

0 comments on commit 4f7830e

Please sign in to comment.