4
4
5
5
#VERSION_DEFINES
6
6
7
+ // Default to relaxed precision.
8
+ precision mediump float ;
9
+
7
10
/* Include our forward mobile UBOs definitions etc. */
8
11
#include "scene_forward_mobile_inc.glsl"
9
12
13
16
/* INPUT ATTRIBS */
14
17
15
18
// Always contains vertex position in XYZ, can contain tangent angle in W.
16
- layout (location = 0 ) in vec4 vertex_angle_attrib;
19
+ layout (location = 0 ) in highp vec4 vertex_angle_attrib;
17
20
18
21
// only for pure render depth when normal is not used
19
22
20
23
#ifdef NORMAL_USED
21
24
// Contains Normal/Axis in RG, can contain tangent in BA.
22
- layout (location = 1 ) in vec4 axis_tangent_attrib;
25
+ layout (location = 1 ) in highp vec4 axis_tangent_attrib;
23
26
#endif
24
27
25
28
// Location 2 is unused.
26
29
27
30
#if defined(COLOR_USED)
28
- layout (location = 3 ) in vec4 color_attrib;
31
+ layout (location = 3 ) in highp vec4 color_attrib;
29
32
#endif
30
33
31
34
#ifdef UV_USED
32
- layout (location = 4 ) in vec2 uv_attrib;
35
+ layout (location = 4 ) in highp vec2 uv_attrib;
33
36
#endif
34
37
35
38
#if defined(UV2_USED) || defined(USE_LIGHTMAP) || defined(MODE_RENDER_MATERIAL)
36
- layout (location = 5 ) in vec2 uv2_attrib;
39
+ layout (location = 5 ) in highp vec2 uv2_attrib;
37
40
#endif // MODE_RENDER_MATERIAL
38
41
39
42
#if defined(CUSTOM0_USED)
40
- layout (location = 6 ) in vec4 custom0_attrib;
43
+ layout (location = 6 ) in highp vec4 custom0_attrib;
41
44
#endif
42
45
43
46
#if defined(CUSTOM1_USED)
44
- layout (location = 7 ) in vec4 custom1_attrib;
47
+ layout (location = 7 ) in highp vec4 custom1_attrib;
45
48
#endif
46
49
47
50
#if defined(CUSTOM2_USED)
48
- layout (location = 8 ) in vec4 custom2_attrib;
51
+ layout (location = 8 ) in highp vec4 custom2_attrib;
49
52
#endif
50
53
51
54
#if defined(CUSTOM3_USED)
52
- layout (location = 9 ) in vec4 custom3_attrib;
55
+ layout (location = 9 ) in highp vec4 custom3_attrib;
53
56
#endif
54
57
55
58
#if defined(BONES_USED) || defined(USE_PARTICLE_TRAILS)
56
59
layout (location = 10 ) in uvec4 bone_attrib;
57
60
#endif
58
61
59
62
#if defined(WEIGHTS_USED) || defined(USE_PARTICLE_TRAILS)
60
- layout (location = 11 ) in vec4 weight_attrib;
63
+ layout (location = 11 ) in highp vec4 weight_attrib;
61
64
#endif
62
65
63
66
vec3 oct_to_vec3(vec2 e) {
@@ -79,31 +82,31 @@ void axis_angle_to_tbn(vec3 axis, float angle, out vec3 tangent, out vec3 binorm
79
82
80
83
/* Varyings */
81
84
82
- layout (location = 0 ) highp out vec3 vertex_interp;
85
+ layout (location = 0 ) out highp vec3 vertex_interp;
83
86
84
87
#ifdef NORMAL_USED
85
- layout (location = 1 ) mediump out vec3 normal_interp;
88
+ layout (location = 1 ) out vec3 normal_interp;
86
89
#endif
87
90
88
91
#if defined(COLOR_USED)
89
- layout (location = 2 ) mediump out vec4 color_interp;
92
+ layout (location = 2 ) out vec4 color_interp;
90
93
#endif
91
94
92
95
#ifdef UV_USED
93
- layout (location = 3 ) mediump out vec2 uv_interp;
96
+ layout (location = 3 ) out vec2 uv_interp;
94
97
#endif
95
98
96
99
#if defined(UV2_USED) || defined(USE_LIGHTMAP)
97
- layout (location = 4 ) mediump out vec2 uv2_interp;
100
+ layout (location = 4 ) out vec2 uv2_interp;
98
101
#endif
99
102
100
103
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
101
- layout (location = 5 ) mediump out vec3 tangent_interp;
102
- layout (location = 6 ) mediump out vec3 binormal_interp;
104
+ layout (location = 5 ) out vec3 tangent_interp;
105
+ layout (location = 6 ) out vec3 binormal_interp;
103
106
#endif
104
107
#if ! defined(MODE_RENDER_DEPTH) && ! defined(MODE_UNSHADED) && defined(USE_VERTEX_LIGHTING)
105
- layout (location = 7 ) highp out vec4 diffuse_light_interp;
106
- layout (location = 8 ) highp out vec4 specular_light_interp;
108
+ layout (location = 7 ) out highp vec4 diffuse_light_interp;
109
+ layout (location = 8 ) out highp vec4 specular_light_interp;
107
110
108
111
#include "../scene_forward_vertex_lights_inc.glsl"
109
112
#endif // !defined(MODE_RENDER_DEPTH) && !defined(MODE_UNSHADED) && defined(USE_VERTEX_LIGHTING)
@@ -567,6 +570,9 @@ void main() {
567
570
568
571
#VERSION_DEFINES
569
572
573
+ // Default to relaxed precision.
574
+ precision mediump float ;
575
+
570
576
#define SHADER_IS_SRGB false
571
577
#define SHADER_SPACE_FAR 0.0
572
578
@@ -575,37 +581,37 @@ void main() {
575
581
576
582
/* Varyings */
577
583
578
- layout (location = 0 ) highp in vec3 vertex_interp;
584
+ layout (location = 0 ) in highp vec3 vertex_interp;
579
585
580
586
#ifdef NORMAL_USED
581
- layout (location = 1 ) mediump in vec3 normal_interp;
587
+ layout (location = 1 ) in vec3 normal_interp;
582
588
#endif
583
589
584
590
#if defined(COLOR_USED)
585
- layout (location = 2 ) mediump in vec4 color_interp;
591
+ layout (location = 2 ) in vec4 color_interp;
586
592
#endif
587
593
588
594
#ifdef UV_USED
589
- layout (location = 3 ) mediump in vec2 uv_interp;
595
+ layout (location = 3 ) in vec2 uv_interp;
590
596
#endif
591
597
592
598
#if defined(UV2_USED) || defined(USE_LIGHTMAP)
593
- layout (location = 4 ) mediump in vec2 uv2_interp;
599
+ layout (location = 4 ) in vec2 uv2_interp;
594
600
#endif
595
601
596
602
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
597
- layout (location = 5 ) mediump in vec3 tangent_interp;
598
- layout (location = 6 ) mediump in vec3 binormal_interp;
603
+ layout (location = 5 ) in vec3 tangent_interp;
604
+ layout (location = 6 ) in vec3 binormal_interp;
599
605
#endif
600
606
601
607
#if ! defined(MODE_RENDER_DEPTH) && ! defined(MODE_UNSHADED) && defined(USE_VERTEX_LIGHTING)
602
- layout (location = 7 ) highp in vec4 diffuse_light_interp;
603
- layout (location = 8 ) highp in vec4 specular_light_interp;
608
+ layout (location = 7 ) in highp vec4 diffuse_light_interp;
609
+ layout (location = 8 ) in highp vec4 specular_light_interp;
604
610
#endif
605
611
606
612
#ifdef MODE_DUAL_PARABOLOID
607
613
608
- layout (location = 9 ) highp in float dp_clip;
614
+ layout (location = 9 ) in highp float dp_clip;
609
615
610
616
#endif
611
617
0 commit comments