@@ -72,6 +72,22 @@ directional_lights;
7272
7373#define DIRECTIONAL_LIGHT_ENABLED uint (1 << 0 )
7474
75+ // mat4 is a waste of space, but we don't have an easy way to set a mat3 uniform for now
76+ uniform mat4 orientation;
77+ uniform vec4 projection;
78+ uniform vec3 position;
79+ uniform float time;
80+ uniform float sky_energy_multiplier;
81+ uniform float luminance_multiplier;
82+
83+ uniform float fog_aerial_perspective;
84+ uniform vec4 fog_light_color;
85+ uniform float fog_sun_scatter;
86+ uniform bool fog_enabled;
87+ uniform float fog_density;
88+ uniform float fog_sky_affect;
89+ uniform uint directional_light_count;
90+
7591/* clang-format off */
7692
7793#ifdef MATERIAL_UNIFORMS_USED
@@ -102,22 +118,6 @@ layout(std140) uniform MaterialUniforms{ //ubo:3
102118#define AT_QUARTER_RES_PASS false
103119#endif
104120
105- // mat4 is a waste of space, but we don't have an easy way to set a mat3 uniform for now
106- uniform mat4 orientation;
107- uniform vec4 projection;
108- uniform vec3 position;
109- uniform float time;
110- uniform float sky_energy_multiplier;
111- uniform float luminance_multiplier;
112-
113- uniform float fog_aerial_perspective;
114- uniform vec4 fog_light_color;
115- uniform float fog_sun_scatter;
116- uniform bool fog_enabled;
117- uniform float fog_density;
118- uniform float fog_sky_affect;
119- uniform uint directional_light_count;
120-
121121#ifdef USE_MULTIVIEW
122122layout (std140) uniform MultiviewData { // ubo:11
123123 highp mat4 projection_matrix_view[MAX_VIEWS];
@@ -218,24 +218,24 @@ void main() {
218218
219219#ifdef USE_CUBEMAP_PASS
220220#ifdef USES_HALF_RES_COLOR
221- half_res_color = texture(samplerCube ( half_res, SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP) , cube_normal);
221+ half_res_color = texture(half_res, cube_normal);
222222#endif
223223#ifdef USES_QUARTER_RES_COLOR
224- quarter_res_color = texture(samplerCube ( quarter_res, SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP) , cube_normal);
224+ quarter_res_color = texture(quarter_res, cube_normal);
225225#endif
226226#else
227227#ifdef USES_HALF_RES_COLOR
228228#ifdef USE_MULTIVIEW
229- half_res_color = textureLod(sampler2DArray ( half_res, SAMPLER_LINEAR_CLAMP) , vec3 (uv, ViewIndex), 0.0 );
229+ half_res_color = textureLod(half_res, vec3 (uv, ViewIndex), 0.0 );
230230#else
231- half_res_color = textureLod(sampler2D ( half_res, SAMPLER_LINEAR_CLAMP) , uv, 0.0 );
231+ half_res_color = textureLod(half_res, uv, 0.0 );
232232#endif
233233#endif
234234#ifdef USES_QUARTER_RES_COLOR
235235#ifdef USE_MULTIVIEW
236- quarter_res_color = textureLod(sampler2DArray ( quarter_res, SAMPLER_LINEAR_CLAMP) , vec3 (uv, ViewIndex), 0.0 );
236+ quarter_res_color = textureLod(quarter_res, vec3 (uv, ViewIndex), 0.0 );
237237#else
238- quarter_res_color = textureLod(sampler2D ( quarter_res, SAMPLER_LINEAR_CLAMP) , uv, 0.0 );
238+ quarter_res_color = textureLod(quarter_res, uv, 0.0 );
239239#endif
240240#endif
241241#endif
0 commit comments