@@ -802,7 +802,7 @@ vec4 volumetric_fog_process(vec2 screen_uv, float z) {
802802 fog_pos.z = pow (fog_pos.z, implementation_data.volumetric_fog_detail_spread);
803803 }
804804
805- return texture(sampler3D (volumetric_fog_texture, DEFAULT_SAMPLER_LINEAR_CLAMP ), fog_pos);
805+ return texture(sampler3D (volumetric_fog_texture, SAMPLER_LINEAR_CLAMP ), fog_pos);
806806}
807807
808808vec4 fog_process(vec3 vertex) {
@@ -1379,10 +1379,10 @@ void fragment_shader(in SceneData scene_data) {
13791379
13801380 if (uses_sh) {
13811381 uvw.z *= 4.0 ; // SH textures use 4 times more data
1382- vec3 lm_light_l0 = textureLod(sampler2DArray (lightmap_textures[ofs], DEFAULT_SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 0.0 ), 0.0 ).rgb;
1383- vec3 lm_light_l1n1 = textureLod(sampler2DArray (lightmap_textures[ofs], DEFAULT_SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 1.0 ), 0.0 ).rgb;
1384- vec3 lm_light_l1_0 = textureLod(sampler2DArray (lightmap_textures[ofs], DEFAULT_SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 2.0 ), 0.0 ).rgb;
1385- vec3 lm_light_l1p1 = textureLod(sampler2DArray (lightmap_textures[ofs], DEFAULT_SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 3.0 ), 0.0 ).rgb;
1382+ vec3 lm_light_l0 = textureLod(sampler2DArray (lightmap_textures[ofs], SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 0.0 ), 0.0 ).rgb;
1383+ vec3 lm_light_l1n1 = textureLod(sampler2DArray (lightmap_textures[ofs], SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 1.0 ), 0.0 ).rgb;
1384+ vec3 lm_light_l1_0 = textureLod(sampler2DArray (lightmap_textures[ofs], SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 2.0 ), 0.0 ).rgb;
1385+ vec3 lm_light_l1p1 = textureLod(sampler2DArray (lightmap_textures[ofs], SAMPLER_LINEAR_CLAMP ), uvw + vec3 (0.0 , 0.0 , 3.0 ), 0.0 ).rgb;
13861386
13871387 vec3 n = normalize (lightmaps.data[ofs].normal_xform * normal);
13881388 float en = lightmaps.data[ofs].exposure_normalization;
@@ -1399,7 +1399,7 @@ void fragment_shader(in SceneData scene_data) {
13991399 }
14001400
14011401 } else {
1402- ambient_light += textureLod(sampler2DArray (lightmap_textures[ofs], DEFAULT_SAMPLER_LINEAR_CLAMP ), uvw, 0.0 ).rgb * lightmaps.data[ofs].exposure_normalization;
1402+ ambient_light += textureLod(sampler2DArray (lightmap_textures[ofs], SAMPLER_LINEAR_CLAMP ), uvw, 0.0 ).rgb * lightmaps.data[ofs].exposure_normalization;
14031403 }
14041404 }
14051405#else
@@ -1519,18 +1519,18 @@ void fragment_shader(in SceneData scene_data) {
15191519 vec2 base_coord = screen_uv;
15201520 vec2 closest_coord = base_coord;
15211521#ifdef USE_MULTIVIEW
1522- float closest_ang = dot (normal, textureLod(sampler2DArray (normal_roughness_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), vec3 (base_coord, ViewIndex), 0.0 ).xyz * 2.0 - 1.0 );
1522+ float closest_ang = dot (normal, textureLod(sampler2DArray (normal_roughness_buffer, SAMPLER_LINEAR_CLAMP ), vec3 (base_coord, ViewIndex), 0.0 ).xyz * 2.0 - 1.0 );
15231523#else // USE_MULTIVIEW
1524- float closest_ang = dot (normal, textureLod(sampler2D (normal_roughness_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), base_coord, 0.0 ).xyz * 2.0 - 1.0 );
1524+ float closest_ang = dot (normal, textureLod(sampler2D (normal_roughness_buffer, SAMPLER_LINEAR_CLAMP ), base_coord, 0.0 ).xyz * 2.0 - 1.0 );
15251525#endif // USE_MULTIVIEW
15261526
15271527 for (int i = 0 ; i < 4 ; i++ ) {
15281528 const vec2 neighbors[4 ] = vec2 [](vec2 (- 1 , 0 ), vec2 (1 , 0 ), vec2 (0 , - 1 ), vec2 (0 , 1 ));
15291529 vec2 neighbour_coord = base_coord + neighbors[i] * scene_data.screen_pixel_size;
15301530#ifdef USE_MULTIVIEW
1531- float neighbour_ang = dot (normal, textureLod(sampler2DArray (normal_roughness_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), vec3 (neighbour_coord, ViewIndex), 0.0 ).xyz * 2.0 - 1.0 );
1531+ float neighbour_ang = dot (normal, textureLod(sampler2DArray (normal_roughness_buffer, SAMPLER_LINEAR_CLAMP ), vec3 (neighbour_coord, ViewIndex), 0.0 ).xyz * 2.0 - 1.0 );
15321532#else // USE_MULTIVIEW
1533- float neighbour_ang = dot (normal, textureLod(sampler2D (normal_roughness_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), neighbour_coord, 0.0 ).xyz * 2.0 - 1.0 );
1533+ float neighbour_ang = dot (normal, textureLod(sampler2D (normal_roughness_buffer, SAMPLER_LINEAR_CLAMP ), neighbour_coord, 0.0 ).xyz * 2.0 - 1.0 );
15341534#endif // USE_MULTIVIEW
15351535 if (neighbour_ang > closest_ang) {
15361536 closest_ang = neighbour_ang;
@@ -1545,11 +1545,11 @@ void fragment_shader(in SceneData scene_data) {
15451545 }
15461546
15471547#ifdef USE_MULTIVIEW
1548- vec4 buffer_ambient = textureLod(sampler2DArray (ambient_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), vec3 (coord, ViewIndex), 0.0 );
1549- vec4 buffer_reflection = textureLod(sampler2DArray (reflection_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), vec3 (coord, ViewIndex), 0.0 );
1548+ vec4 buffer_ambient = textureLod(sampler2DArray (ambient_buffer, SAMPLER_LINEAR_CLAMP ), vec3 (coord, ViewIndex), 0.0 );
1549+ vec4 buffer_reflection = textureLod(sampler2DArray (reflection_buffer, SAMPLER_LINEAR_CLAMP ), vec3 (coord, ViewIndex), 0.0 );
15501550#else // USE_MULTIVIEW
1551- vec4 buffer_ambient = textureLod(sampler2D (ambient_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), coord, 0.0 );
1552- vec4 buffer_reflection = textureLod(sampler2D (reflection_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), coord, 0.0 );
1551+ vec4 buffer_ambient = textureLod(sampler2D (ambient_buffer, SAMPLER_LINEAR_CLAMP ), coord, 0.0 );
1552+ vec4 buffer_reflection = textureLod(sampler2D (reflection_buffer, SAMPLER_LINEAR_CLAMP ), coord, 0.0 );
15531553#endif // USE_MULTIVIEW
15541554
15551555 ambient_light = mix (ambient_light, buffer_ambient.rgb, buffer_ambient.a);
@@ -1559,9 +1559,9 @@ void fragment_shader(in SceneData scene_data) {
15591559
15601560 if (bool (implementation_data.ss_effects_flags & SCREEN_SPACE_EFFECTS_FLAGS_USE_SSAO)) {
15611561#ifdef USE_MULTIVIEW
1562- float ssao = texture(sampler2DArray (ao_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), vec3 (screen_uv, ViewIndex)).r;
1562+ float ssao = texture(sampler2DArray (ao_buffer, SAMPLER_LINEAR_CLAMP ), vec3 (screen_uv, ViewIndex)).r;
15631563#else
1564- float ssao = texture(sampler2D (ao_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), screen_uv).r;
1564+ float ssao = texture(sampler2D (ao_buffer, SAMPLER_LINEAR_CLAMP ), screen_uv).r;
15651565#endif
15661566 ao = min (ao, ssao);
15671567 ao_light_affect = mix (ao_light_affect, max (ao_light_affect, implementation_data.ssao_light_affect), implementation_data.ssao_ao_affect);
@@ -1646,9 +1646,9 @@ void fragment_shader(in SceneData scene_data) {
16461646
16471647 if (bool (implementation_data.ss_effects_flags & SCREEN_SPACE_EFFECTS_FLAGS_USE_SSIL)) {
16481648#ifdef USE_MULTIVIEW
1649- vec4 ssil = textureLod(sampler2DArray (ssil_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), vec3 (screen_uv, ViewIndex), 0.0 );
1649+ vec4 ssil = textureLod(sampler2DArray (ssil_buffer, SAMPLER_LINEAR_CLAMP ), vec3 (screen_uv, ViewIndex), 0.0 );
16501650#else
1651- vec4 ssil = textureLod(sampler2D (ssil_buffer, DEFAULT_SAMPLER_LINEAR_CLAMP ), screen_uv, 0.0 );
1651+ vec4 ssil = textureLod(sampler2D (ssil_buffer, SAMPLER_LINEAR_CLAMP ), screen_uv, 0.0 );
16521652#endif // USE_MULTIVIEW
16531653 ambient_light *= 1.0 - ssil.a;
16541654 ambient_light += ssil.rgb * albedo.rgb;
@@ -1932,7 +1932,7 @@ void fragment_shader(in SceneData scene_data) {
19321932 vec4 trans_coord = directional_lights.data[i].shadow_matrix1 * trans_vertex;
19331933 trans_coord /= trans_coord.w;
19341934
1935- float shadow_z = textureLod(sampler2D (directional_shadow_atlas, DEFAULT_SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
1935+ float shadow_z = textureLod(sampler2D (directional_shadow_atlas, SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
19361936 shadow_z *= directional_lights.data[i].shadow_z_range.x;
19371937 float z = trans_coord.z * directional_lights.data[i].shadow_z_range.x;
19381938
@@ -1942,7 +1942,7 @@ void fragment_shader(in SceneData scene_data) {
19421942 vec4 trans_coord = directional_lights.data[i].shadow_matrix2 * trans_vertex;
19431943 trans_coord /= trans_coord.w;
19441944
1945- float shadow_z = textureLod(sampler2D (directional_shadow_atlas, DEFAULT_SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
1945+ float shadow_z = textureLod(sampler2D (directional_shadow_atlas, SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
19461946 shadow_z *= directional_lights.data[i].shadow_z_range.y;
19471947 float z = trans_coord.z * directional_lights.data[i].shadow_z_range.y;
19481948
@@ -1952,7 +1952,7 @@ void fragment_shader(in SceneData scene_data) {
19521952 vec4 trans_coord = directional_lights.data[i].shadow_matrix3 * trans_vertex;
19531953 trans_coord /= trans_coord.w;
19541954
1955- float shadow_z = textureLod(sampler2D (directional_shadow_atlas, DEFAULT_SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
1955+ float shadow_z = textureLod(sampler2D (directional_shadow_atlas, SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
19561956 shadow_z *= directional_lights.data[i].shadow_z_range.z;
19571957 float z = trans_coord.z * directional_lights.data[i].shadow_z_range.z;
19581958
@@ -1963,7 +1963,7 @@ void fragment_shader(in SceneData scene_data) {
19631963 vec4 trans_coord = directional_lights.data[i].shadow_matrix4 * trans_vertex;
19641964 trans_coord /= trans_coord.w;
19651965
1966- float shadow_z = textureLod(sampler2D (directional_shadow_atlas, DEFAULT_SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
1966+ float shadow_z = textureLod(sampler2D (directional_shadow_atlas, SAMPLER_LINEAR_CLAMP ), trans_coord.xy, 0.0 ).r;
19671967 shadow_z *= directional_lights.data[i].shadow_z_range.w;
19681968 float z = trans_coord.z * directional_lights.data[i].shadow_z_range.w;
19691969
0 commit comments