Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 884 vs 885 for /trunk/assets/shaders/GLSL/terrainTess.glsl

Diff revisions: vs.
  @@ -77,8 +77,8 @@
77 77 vec4 view0 = mvMatrix * vec4(p0.xyz + offset, p0.w);
78 78 vec4 view1 = mvMatrix * vec4(p1.xyz + offset, p1.w);
79 79
80 - float MinDepth = 10.0;
81 - float MaxDepth = 100000.0;
80 + float MinDepth = 5.0;
81 + float MaxDepth = 150.0;
82 82
83 83 float d0 = clamp((abs(p0.z) - MinDepth) / (MaxDepth - MinDepth), 0.0, 1.0);
84 84 float d1 = clamp((abs(p1.z) - MinDepth) / (MaxDepth - MinDepth), 0.0, 1.0);
  @@ -172,6 +172,8 @@
172 172
173 173 void main(void)
174 174 {
175 + PassData(gl_InvocationID);
176 +
175 177 mat4 mvMatrix = dvd_WorldViewMatrix(VAR.dvd_instanceID);
176 178
177 179 // Outer tessellation level
  @@ -180,6 +182,11 @@
180 182 gl_TessLevelOuter[2] = dlodCameraDistance(gl_in[1].gl_Position, gl_in[2].gl_Position, _in[1]._texCoord, _in[2]._texCoord);
181 183 gl_TessLevelOuter[3] = dlodCameraDistance(gl_in[2].gl_Position, gl_in[3].gl_Position, _in[2]._texCoord, _in[3]._texCoord);
182 184
185 + /*gl_TessLevelOuter[0] = dlodSphere(gl_in[3].gl_Position, gl_in[0].gl_Position, _in[3]._texCoord, _in[0]._texCoord);
186 + gl_TessLevelOuter[1] = dlodSphere(gl_in[0].gl_Position, gl_in[1].gl_Position, _in[0]._texCoord, _in[1]._texCoord);
187 + gl_TessLevelOuter[2] = dlodSphere(gl_in[1].gl_Position, gl_in[2].gl_Position, _in[1]._texCoord, _in[2]._texCoord);
188 + gl_TessLevelOuter[3] = dlodSphere(gl_in[2].gl_Position, gl_in[3].gl_Position, _in[2]._texCoord, _in[3]._texCoord);*/
189 +
183 190 float tscale_negx = dvd_TerrainData[VAR.dvd_drawID]._tScale.x;
184 191 float tscale_negz = dvd_TerrainData[VAR.dvd_drawID]._tScale.y;
185 192 float tscale_posx = dvd_TerrainData[VAR.dvd_drawID]._tScale.z;
  @@ -208,8 +215,6 @@
208 215 // Pass the patch verts along
209 216 gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
210 217
211 - PassData(gl_InvocationID);
212 -
213 218 // Output tessellation level (used for wireframe coloring)
214 219 tcs_tessLevel[gl_InvocationID] = gl_TessLevelOuter[0];
215 220 }
  @@ -410,7 +415,7 @@
410 415 gl_Position = getWVPPositon(i);
411 416
412 417 #if !defined(SHADOW_PASS)
413 - _waterDistance = gl_in[i].gl_ClipDistance[0];
418 + _waterDistance = dvd_clip_plane[0].w;
414 419 _waterDepth = waterDepth(i);
415 420
416 421 _scrollingUV = getScrollingUV(i);
  @@ -439,7 +444,7 @@
439 444 gl_Position = getWVPPositon(0);
440 445
441 446 #if !defined(SHADOW_PASS)
442 - _waterDistance = gl_in[0].gl_ClipDistance[0];
447 + _waterDistance = dvd_clip_plane[0].w;
443 448 _scrollingUV = getScrollingUV(0);
444 449 _waterDepth = waterDepth(0);
445 450 # if defined(_DEBUG)