1 #ifndef SHADER_scene_water_fast_H
2 #define SHADER_scene_water_fast_H
3 static void shader_scene_water_fast_link(void);
4 static void shader_scene_water_fast_register(void);
5 static struct vg_shader _shader_scene_water_fast
= {
6 .name
= "scene_water_fast",
7 .link
= shader_scene_water_fast_link
,
10 .orig_file
= "shaders/scene.vs",
12 "layout (location=0) in vec3 a_co;\n"
13 "layout (location=1) in vec4 a_norm;\n"
14 "layout (location=2) in vec2 a_uv;\n"
15 "layout (location=3) in ivec4 a_lights;\n"
18 "const float k_motion_lerp_amount = 0.01;\n"
22 "out vec3 aMotionVec0;\n"
23 "out vec3 aMotionVec1;\n"
25 "void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
27 " // This magically solves some artifacting errors!\n"
29 " vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
31 " aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
32 " aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
37 "uniform mat4x3 uMdl;\n"
39 "uniform mat4 uPvmPrev;\n"
44 "out vec3 aWorldCo;\n"
46 "flat out ivec4 light_indices;\n"
50 " vec3 world_pos0 = uMdl * vec4( a_co, 1.0 );\n"
51 " vec4 vproj0 = uPv * vec4( world_pos0, 1.0 );\n"
52 " vec4 vproj1 = uPvmPrev * vec4( a_co, 1.0 );\n"
54 " vs_motion_out( vproj0, vproj1 );\n"
56 " gl_Position = vproj0;\n"
59 " aNorm = vec4( mat3(uMdl) * a_norm.xyz, a_norm.w );\n"
61 " aWorldCo = world_pos0;\n"
63 " light_indices = a_lights;\n"
68 .orig_file
= "shaders/scene_water_fast.fs",
70 "uniform sampler2D uTexDudv;\n"
72 "uniform float uTime;\n"
73 "uniform vec3 uCamera;\n"
74 "uniform float uSurfaceY;\n"
75 "uniform vec3 uBoard0;\n"
76 "uniform vec3 uBoard1;\n"
78 "uniform vec3 uShoreColour;\n"
79 "uniform vec3 uOceanColour;\n"
88 "flat in ivec4 light_indices;\n"
90 "uniform samplerBuffer uLightsArray;\n"
93 "layout (location = 0) out vec4 oColour;\n"
95 "layout (std140) uniform ub_world_lighting\n"
97 " vec4 g_light_colours[3];\n"
98 " vec4 g_light_directions[3];\n"
99 " vec4 g_ambient_colour;\n"
101 " vec4 g_water_plane;\n"
102 " vec4 g_depth_bounds;\n"
103 " float g_water_fog;\n"
105 " int g_light_count;\n"
106 " int g_light_preview;\n"
107 " int g_shadow_samples;\n"
111 " //vec4 g_point_light_positions[32];\n"
112 " //vec4 g_point_light_colours[32];\n"
115 "uniform sampler2D g_world_depth;\n"
117 "float world_depth_sample( vec3 pos )\n"
119 " vec2 depth_coord = (pos.xz - g_depth_bounds.xy) * g_depth_bounds.zw; \n"
120 " return texture( g_world_depth, depth_coord ).r;\n"
123 "float world_water_depth( vec3 pos )\n"
125 " vec2 depth_coord = (pos.xz - g_depth_bounds.xy) * g_depth_bounds.zw; \n"
126 " float ref_depth = g_water_plane.y*g_water_plane.w;\n"
127 " return texture( g_world_depth, depth_coord ).g - ref_depth;\n"
130 "float shadow_sample( vec3 vdir )\n"
132 " vec3 sample_pos = aWorldCo + vdir;\n"
133 " float height_sample = world_depth_sample( sample_pos );\n"
135 " float fdelta = height_sample - sample_pos.y;\n"
136 " return clamp( fdelta, 0.1, 0.2 )-0.1;\n"
139 "vec3 apply_fog( vec3 vfrag, float fdist )\n"
141 " float dist = pow(fdist*0.0008,1.2);\n"
142 " return mix( vfrag, vec3(0.55,0.76,1.0), min( 1.0, dist ) );\n"
146 "// New lighting model\n"
148 "vec3 newlight_compute_ambient()\n"
150 " return g_ambient_colour.rgb;\n"
153 "float newlight_compute_sun_shadow( vec3 dir )\n"
155 " if( g_shadow_samples == 0 )\n"
160 " float fspread = g_light_colours[0].w;\n"
161 " vec3 vdir = dir;\n"
162 " float flength = g_light_directions[0].w;\n"
164 " float famt = 0.0;\n"
165 " famt+=shadow_sample((vdir+vec3(-0.563, 0.550, 0.307)*fspread)*flength*0.1);\n"
166 " famt+=shadow_sample((vdir+vec3( 0.808, 0.686, 0.346)*fspread)*flength*0.2);\n"
167 " famt+=shadow_sample((vdir+vec3( 0.787, 0.074,-0.065)*fspread)*flength*0.3);\n"
168 " famt+=shadow_sample((vdir+vec3(-0.593, 0.071,-0.425)*fspread)*flength*0.4);\n"
169 " famt+=shadow_sample((vdir+vec3(-0.790,-0.933,-0.875)*fspread)*flength*0.5);\n"
170 " famt+=shadow_sample((vdir+vec3( 0.807,-0.690, 0.472)*fspread)*flength*0.6);\n"
171 " famt+=shadow_sample((vdir+vec3( 0.522,-0.379, 0.350)*fspread)*flength*0.7);\n"
172 " famt+=shadow_sample((vdir+vec3( 0.483, 0.201, 0.306)*fspread)*flength*0.8);\n"
174 " return 1.0 - famt;\n"
177 "vec3 newlight_compute_world_diffuse( vec3 wnormal )\n"
179 " vec3 vtotal = g_ambient_colour.rgb;\n"
181 " for( int i=0; i<g_light_count; i++ )\n"
183 " vec3 vcolour = g_light_colours[i].rgb;\n"
184 " vec3 vdir = g_light_directions[i].xyz;\n"
186 " float flight = max(dot( vdir, wnormal )*0.75+0.25,0.0);\n"
187 " vtotal += vcolour*flight;\n"
193 "vec3 newlight_compute_sun_spec( vec3 wnormal, vec3 halfview, float fintensity )\n"
195 " vec3 vcolour = g_light_colours[0].rgb;\n"
196 " vec3 vdir = g_light_directions[0].xyz;\n"
198 " vec3 specdir = reflect( -vdir, wnormal );\n"
199 " float spec = pow(max(dot( halfview, specdir ), 0.0), 10.0);\n"
200 " return vcolour*spec*fintensity;\n"
203 "float newlight_specular( vec3 wnormal, vec3 dir, vec3 halfview, float exponent )\n"
205 " vec3 specdir = reflect( -dir, wnormal );\n"
206 " return pow(max(dot( halfview, specdir ), 0.0), exponent);\n"
209 "vec3 newlight_compute_quadratic( vec3 wnormal, vec3 halfview, \n"
210 " vec3 light_colour, vec3 light_pos )\n"
212 " vec3 light_delta = (light_pos-aWorldCo) * 10.0;\n"
214 " float quadratic = dot(light_delta,light_delta);\n"
215 " float attenuation = 1.0f/( 1.0f + quadratic );\n"
216 " attenuation *= max( 0.0, dot( normalize(light_delta), wnormal ) );\n"
218 " return light_colour*attenuation;\n"
221 "vec3 newlight_compute_spot( vec3 wnormal, vec3 halfview, \n"
222 " vec3 light_colour, vec3 light_pos,\n"
223 " vec4 light_dir )\n"
225 " vec3 light_delta = (light_pos-aWorldCo) * 10.0;\n"
227 " float quadratic = dot(light_delta,light_delta);\n"
228 " float attenuation = 1.0f/( 1.0f + quadratic );\n"
230 " light_delta = normalize( light_delta );\n"
231 " attenuation *= max( 0.0, dot( light_delta, wnormal ) );\n"
233 " float spot_theta = max( 0.0, dot( light_delta, -light_dir.xyz ) ),\n"
234 " falloff = max( 0.0,( spot_theta - light_dir.w ) / (1.0-light_dir.w) );\n"
236 " return light_colour*attenuation*falloff;\n"
241 "const vec3 DAYSKY_COLOUR = vec3( 0.37, 0.54, 0.97 );\n"
242 "const vec3 NIGHTSKY_COLOUR = vec3( 0.03, 0.05, 0.20 );\n"
243 "const vec3 SUNSET_COLOUR = vec3( 1.00, 0.32, 0.01 );\n"
244 "const vec3 AMBIENT_COLOUR = vec3( 0.13, 0.17, 0.35 );\n"
245 "const vec3 SUNSET_AMBIENT = vec3( 0.25, 0.17, 0.51 );\n"
246 "const vec3 SUN_COLOUR = vec3( 1.10, 0.89, 0.35 ) * 1.125;\n"
248 "const float SUN_ANGLE = 0.0001;\n"
249 "const float TIME_RATE = 0.025;\n"
251 "const float PI = 3.14159265;\n"
253 "struct world_info\n"
263 "float luminance( vec3 v )\n"
265 " return dot( v, vec3(0.2126, 0.7152, 0.0722) );\n"
268 "vec3 scene_ambient( vec3 dir, const world_info w )\n"
270 " float sun_azimuth = dot( dir.xz, w.sun_dir.xz ) * 0.4 + 0.6;\n"
271 " float sky_gradient = dir.y;\n"
273 " /* Blend phase colours */\n"
274 " vec3 ambient = DAYSKY_COLOUR * (w.day_phase-w.sunset_phase*0.1);\n"
275 " ambient += SUNSET_COLOUR * (1.0-dir.y*0.5) * w.sunset_phase * sun_azimuth;\n"
276 " ambient += NIGHTSKY_COLOUR * (1.0-w.day_phase);\n"
278 " /* Add gradient */\n"
279 " ambient -= sky_gradient * luminance(ambient);\n"
284 "vec3 scene_sky( vec3 ray_dir, const world_info w )\n"
286 " ray_dir.y = abs( ray_dir.y );\n"
287 " vec3 sky_colour = scene_ambient( ray_dir, w );\n"
290 " float sun_theta = dot( ray_dir, w.sun_dir );\n"
291 " float sun_size = max( 0.0, sun_theta * 0.5 + 0.5 + SUN_ANGLE );\n"
292 " float sun_shape = pow( sun_size, 2000.0 );\n"
293 " sun_shape += sun_size * max(w.sun_dir.y,0.0) * 0.5;\n"
295 " vec3 sun_colour = mix( vec3(1.0), SUNSET_COLOUR, w.sunset_phase*0.5 );\n"
296 " sun_colour *= sun_shape;\n"
298 " vec3 composite = sky_colour + sun_colour;\n"
299 " return composite;\n"
302 "vec3 scene_compute_ambient( vec3 normal, const world_info w )\n"
304 " return scene_ambient( (normal * vec3(1.0,-1.0,1.0)) * 0.5 + 0.5, w );\n"
307 "vec3 SR_LIGHT( vec3 normal, vec2 dir, vec3 colour )\n"
309 " vec3 dir3 = vec3\n"
311 " cos(dir.y) * cos(dir.x),\n"
313 " sin(dir.y) * cos(dir.x)\n"
316 " float flight = max( dot( normal, dir3 ) * 0.75 + 0.25, 0.0 );\n"
318 " return flight * colour;\n"
321 "vec3 scene_lighting_old( vec3 normal, const world_info w )\n"
323 " vec3 SR_COLOUR_SUN = vec3( 1.36, 1.35, 1.01 );\n"
324 " vec3 SR_COLOUR_FILL = vec3( 0.33, 0.56, 0.64 );\n"
325 " vec3 SR_COLOUR_RIM = vec3( 0.05, 0.05, 0.23 );\n"
327 " return SR_LIGHT( normal, vec2( 0.63, -0.08 ), SR_COLOUR_SUN ) +\n"
328 " SR_LIGHT( normal, vec2( -2.60, -0.13 ), SR_COLOUR_FILL ) + \n"
329 " SR_LIGHT( normal, vec2( 2.60, -0.84 ), SR_COLOUR_RIM ) ;\n"
332 "vec3 scene_lighting( vec3 normal, float shadow, vec3 halfview, const world_info w )\n"
334 " float fresnel = 1.0 - abs(dot(normal,halfview));\n"
336 " vec3 sky_reflection = 0.5 * fresnel * mix( DAYSKY_COLOUR, SUNSET_COLOUR, w.sunset_phase );\n"
337 " vec3 light_sun = max(0.0,dot(normal,w.sun_dir)*0.75+0.25) * SUN_COLOUR \n"
340 " float scaled_shadow = max( shadow, 1.0 - max(w.sun_dir.y,0.0) );\n"
342 " vec3 ambient = mix( AMBIENT_COLOUR, SUNSET_AMBIENT, w.sunset_phase );\n"
344 " return ambient + (light_sun + sky_reflection) * shadow;\n"
351 " float sun_theta = dot( normal, w.sun_dir );\n"
353 " float softness_min = 0.5;\n"
354 " float softness = softness_min + w.sunset_phase * (1.0-softness_min);\n"
355 " float light_min = 0.0 * w.day_phase;\n"
356 " float light_direct = light_min + smoothstep( -softness, softness, sun_theta ) * (1.0-light_min);\n"
357 " light_direct *= clamp(w.sun_dir.y * 4.0 + 1.0,0.0,1.0) * shadow;\n"
359 " float light_bounce = 0.5 + 0.5 * dot( -normal, w.sun_dir );\n"
360 " light_bounce *= light_bounce * max( w.sun_dir.y, 0.0 );\n"
362 " vec3 light_colour = SUN_COLOUR*w.day_phase + (SUNSET_COLOUR*w.sunset_phase + 0.1);\n"
363 " vec3 dark_colour = mix( AMBIENT_COLOUR, SUNSET_AMBIENT, w.sunset_phase );\n"
365 " float spec = newlight_specular( normal, w.sun_dir, halfview, 2.0 ) \n"
366 " * 0.2 * shadow * w.day_phase;\n"
368 " return mix(dark_colour, light_colour, light_direct) + \n"
370 " dark_colour * light_bounce;\n"
373 "void scene_state( float world_time, out world_info w )\n"
375 " w.time = world_time;\n"
376 " w.time_of_day = fract( w.time );\n"
377 " w.day_phase = cos( w.time_of_day * PI * 2.0 ) * 0.5 + 0.5;\n"
378 " w.sunset_phase = cos( w.time_of_day * PI * 4.0 + PI ) * 0.5 + 0.5;\n"
379 " w.sunset_phase = pow( w.sunset_phase, 6.0 );\n"
381 " float a = w.time_of_day * PI * 2.0;\n"
382 " w.sun_dir = normalize( vec3( sin( a ), cos( a ), 0.2) );\n"
388 "float sdLine( vec3 p, vec3 a, vec3 b )\n"
390 " vec3 pa = p - a;\n"
391 " vec3 ba = b - a;\n"
393 " float h = clamp( dot(pa,ba)/dot(ba,ba), 0.0, 1.0 );\n"
394 " return length( pa - ba*h );\n"
397 "float compute_board_shadow()\n"
399 " // player shadow\n"
400 " float dist_to_player = max( 0.0, sdLine( aWorldCo, uBoard0, uBoard1 )-0.1 );\n"
401 " float player_shadow = max( 1.0-dist_to_player*2.7, 0.0 );\n"
402 " player_shadow *= player_shadow*player_shadow*player_shadow;\n"
404 " return 1.0 - player_shadow*0.8;\n"
407 "vec3 scene_apply_fog( vec3 vfrag, vec3 colour, float fdist )\n"
409 " float dist = pow(fdist*0.0010,0.78);\n"
410 " return mix( vfrag, colour, min( 1.0, dist ) );\n"
413 "vec3 scene_do_lighting( vec3 diffuse, vec3 wnormal )\n"
415 " world_info world;\n"
416 " scene_state( g_time, world );\n"
419 " vec3 halfview = uCamera - aWorldCo;\n"
420 " float fdist = length(halfview);\n"
421 " halfview /= fdist;\n"
423 " vec3 total_light = vec3(0.0);\n"
426 " float world_shadow = newlight_compute_sun_shadow( world.sun_dir \n"
427 " * (1.0/(max(world.sun_dir.y,0.0)+0.2)) );\n"
428 " float board_shadow = compute_board_shadow();\n"
430 " total_light += scene_lighting( wnormal, min( board_shadow, world_shadow ), \n"
431 " halfview, world );\n"
433 " //total_light += scene_lighting_old( wnormal, world );\n"
435 " // Compute the other lights that exist in the map, not effected by the sun\n"
439 " vec4 light_colour_0 = texelFetch( uLightsArray, light_indices.x*3+0 );\n"
440 " vec4 light_colour_1 = texelFetch( uLightsArray, light_indices.y*3+0 );\n"
441 " vec4 light_colour_2 = texelFetch( uLightsArray, light_indices.z*3+0 );\n"
442 " vec4 light_co_0 = texelFetch( uLightsArray, light_indices.x*3+1 );\n"
443 " vec4 light_co_1 = texelFetch( uLightsArray, light_indices.y*3+1 );\n"
444 " vec4 light_co_2 = texelFetch( uLightsArray, light_indices.z*3+1 );\n"
445 " vec4 light_dir_0 = texelFetch( uLightsArray, light_indices.x*3+2 );\n"
446 " vec4 light_dir_1 = texelFetch( uLightsArray, light_indices.y*3+2 );\n"
447 " vec4 light_dir_2 = texelFetch( uLightsArray, light_indices.z*3+2 );\n"
449 " //return vec3(fract(distance(light_co_0.xyz,aWorldCo)),\n"
450 " // fract(distance(light_co_1.xyz,aWorldCo)),\n"
451 " // fract(distance(light_co_2.xyz,aWorldCo)));\n"
453 " // return vec3(fract(light_indices.x * 0.125), fract(light_indices.y*0.125),\n"
454 " // fract(light_indices.z * 0.125 ));\n"
456 " total_light += newlight_compute_spot\n"
458 " wnormal, halfview,\n"
459 " light_colour_0.rgb,\n"
462 " ) * board_shadow;\n"
464 " total_light += newlight_compute_spot\n"
466 " wnormal, halfview,\n"
467 " light_colour_1.rgb,\n"
470 " ) * board_shadow;\n"
471 " total_light += newlight_compute_spot\n"
473 " wnormal, halfview,\n"
474 " light_colour_2.rgb,\n"
477 " ) * board_shadow;\n"
479 " vec3 fog_colour = scene_sky( -halfview, world );\n"
481 " return scene_apply_fog( diffuse * total_light, fog_colour, fdist );\n"
486 "const float k_motion_lerp_amount = 0.01;\n"
490 "layout (location = 1) out vec2 oMotionVec;\n"
492 "in vec3 aMotionVec0;\n"
493 "in vec3 aMotionVec1;\n"
495 "void compute_motion_vectors()\n"
497 " // Write motion vectors\n"
498 " vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
499 " vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
501 " oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
506 "vec4 water_surf( vec3 halfview, vec3 vnorm, float depthvalue )\n"
508 " vec3 surface_tint = mix(uShoreColour, uOceanColour, depthvalue);\n"
510 " float ffresnel = pow(1.0-dot( vnorm, halfview ),5.0);\n"
512 " vec3 lightdir = vec3(0.95,0.0,-0.3);\n"
513 " vec3 specdir = reflect( -lightdir, vnorm );\n"
514 " float spec = pow(max(dot(halfview,specdir),0.0),20.0)*0.3;\n"
516 " return vec4( surface_tint + spec, max(min(depthvalue*4.0, 1.0),0.0) );\n"
521 " compute_motion_vectors();\n"
523 " // Surface colour composite\n"
524 " float depthvalue = clamp( -world_water_depth( aCo )*(1.0/25.0), 0.0, 1.0 );\n"
526 " vec2 world_coord = aCo.xz * 0.008;\n"
527 " vec4 time_offsets = vec4( uTime ) * vec4( 0.008, 0.006, 0.003, 0.03 );\n"
528 " vec4 dudva = texture( uTexDudv, world_coord + time_offsets.xy )-0.5;\n"
529 " vec4 dudvb = texture( uTexDudv, world_coord *7.0 - time_offsets.zw )-0.5;\n"
531 " vec3 surfnorm = dudva.rgb + dudvb.rgb;\n"
532 " surfnorm = normalize(vec3(0.0,1.0,0.0) + dudva.xyz*0.4 + dudvb.xyz*0.1);\n"
535 " float fband = fract( aCo.z*0.02+uTime*0.1+depthvalue*10.0 );\n"
536 " fband = step( fband+dudva.a*0.8, 0.3 ) * max((1.0-depthvalue*4.0),0.0);\n"
539 " vec3 halfview = -normalize( aCo-uCamera );\n"
542 " float fdist = pow(length( aCo.xz-uCamera.xz ) * 0.00047, 2.6);\n"
545 " vec4 vsurface = water_surf( halfview, surfnorm, depthvalue );\n"
546 " vsurface.a -= fdist;\n"
547 " oColour = mix( vsurface, vec4(1.0,1.0,1.0,0.5), fband );\n"
552 static GLuint _uniform_scene_water_fast_uMdl
;
553 static GLuint _uniform_scene_water_fast_uPv
;
554 static GLuint _uniform_scene_water_fast_uPvmPrev
;
555 static GLuint _uniform_scene_water_fast_uTexDudv
;
556 static GLuint _uniform_scene_water_fast_uTime
;
557 static GLuint _uniform_scene_water_fast_uCamera
;
558 static GLuint _uniform_scene_water_fast_uSurfaceY
;
559 static GLuint _uniform_scene_water_fast_uBoard0
;
560 static GLuint _uniform_scene_water_fast_uBoard1
;
561 static GLuint _uniform_scene_water_fast_uShoreColour
;
562 static GLuint _uniform_scene_water_fast_uOceanColour
;
563 static GLuint _uniform_scene_water_fast_uLightsArray
;
564 static GLuint _uniform_scene_water_fast_g_world_depth
;
565 static void shader_scene_water_fast_uMdl(m4x3f m
){
566 glUniformMatrix4x3fv(_uniform_scene_water_fast_uMdl
,1,GL_FALSE
,(float*)m
);
568 static void shader_scene_water_fast_uPv(m4x4f m
){
569 glUniformMatrix4fv(_uniform_scene_water_fast_uPv
,1,GL_FALSE
,(float*)m
);
571 static void shader_scene_water_fast_uPvmPrev(m4x4f m
){
572 glUniformMatrix4fv(_uniform_scene_water_fast_uPvmPrev
,1,GL_FALSE
,(float*)m
);
574 static void shader_scene_water_fast_uTexDudv(int i
){
575 glUniform1i(_uniform_scene_water_fast_uTexDudv
,i
);
577 static void shader_scene_water_fast_uTime(float f
){
578 glUniform1f(_uniform_scene_water_fast_uTime
,f
);
580 static void shader_scene_water_fast_uCamera(v3f v
){
581 glUniform3fv(_uniform_scene_water_fast_uCamera
,1,v
);
583 static void shader_scene_water_fast_uSurfaceY(float f
){
584 glUniform1f(_uniform_scene_water_fast_uSurfaceY
,f
);
586 static void shader_scene_water_fast_uBoard0(v3f v
){
587 glUniform3fv(_uniform_scene_water_fast_uBoard0
,1,v
);
589 static void shader_scene_water_fast_uBoard1(v3f v
){
590 glUniform3fv(_uniform_scene_water_fast_uBoard1
,1,v
);
592 static void shader_scene_water_fast_uShoreColour(v3f v
){
593 glUniform3fv(_uniform_scene_water_fast_uShoreColour
,1,v
);
595 static void shader_scene_water_fast_uOceanColour(v3f v
){
596 glUniform3fv(_uniform_scene_water_fast_uOceanColour
,1,v
);
598 static void shader_scene_water_fast_g_world_depth(int i
){
599 glUniform1i(_uniform_scene_water_fast_g_world_depth
,i
);
601 static void shader_scene_water_fast_register(void){
602 vg_shader_register( &_shader_scene_water_fast
);
604 static void shader_scene_water_fast_use(void){ glUseProgram(_shader_scene_water_fast
.id
); }
605 static void shader_scene_water_fast_link(void){
606 _uniform_scene_water_fast_uMdl
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uMdl" );
607 _uniform_scene_water_fast_uPv
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uPv" );
608 _uniform_scene_water_fast_uPvmPrev
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uPvmPrev" );
609 _uniform_scene_water_fast_uTexDudv
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uTexDudv" );
610 _uniform_scene_water_fast_uTime
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uTime" );
611 _uniform_scene_water_fast_uCamera
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uCamera" );
612 _uniform_scene_water_fast_uSurfaceY
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uSurfaceY" );
613 _uniform_scene_water_fast_uBoard0
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uBoard0" );
614 _uniform_scene_water_fast_uBoard1
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uBoard1" );
615 _uniform_scene_water_fast_uShoreColour
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uShoreColour" );
616 _uniform_scene_water_fast_uOceanColour
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uOceanColour" );
617 _uniform_scene_water_fast_uLightsArray
= glGetUniformLocation( _shader_scene_water_fast
.id
, "uLightsArray" );
618 _uniform_scene_water_fast_g_world_depth
= glGetUniformLocation( _shader_scene_water_fast
.id
, "g_world_depth" );
620 #endif /* SHADER_scene_water_fast_H */