Improved Demo and multithreading rendering:
-added support for multithreaded rendering (fast) -improved shaders -added support for rendering depth -added rendering color support -improved DeptThreadPool (dynamics setting number of tryWait counts before TryWait. Low cpu usage with high responivity) -added possibility to change number of threads
This commit is contained in:
parent
f6e7af1014
commit
c94510a487
8 changed files with 311 additions and 105 deletions
|
|
@ -70,7 +70,7 @@ precision lowp samplerCube;
|
|||
#endif
|
||||
#endif*/
|
||||
|
||||
|
||||
#define VBO_BATCH 1
|
||||
|
||||
M_OUT vec2 uv;
|
||||
L_OUT vec4 color;
|
||||
|
|
@ -91,12 +91,16 @@ LOC(1) ATT vec2 tex_coords;
|
|||
#endif
|
||||
|
||||
void main() {
|
||||
#ifdef VBO_BATCH
|
||||
vec3 position = vec3(positions*4,1.0);
|
||||
uv = tex_coords;
|
||||
#else
|
||||
vec3 position = mat3(matrix_1.x,matrix_1.y,0,matrix_1.z,matrix_1.w,0,matrix_2.xy,1) * vec3(positions,1.0);
|
||||
uv = tex_coords * uv_transform.zw + uv_transform.xy;
|
||||
#endif
|
||||
|
||||
vec3 position = mat3(matrix_1.x,matrix_1.y,0,matrix_1.z,matrix_1.w,0,matrix_2.xy,1) * vec3(positions,1.0);
|
||||
position.z = depth;
|
||||
uv = tex_coords * uv_transform.zw + uv_transform.xy;
|
||||
color = vcolor;
|
||||
|
||||
gl_Position = vec4(position.xy,0,1.0);
|
||||
gl_Position = vec4(position.xy,depth,1.0);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue