• Home
  • Raw
  • Download

Lines Matching refs:TString

22 static TString BuiltInFunctionsCommon()  in BuiltInFunctionsCommon()
24 TString s; in BuiltInFunctionsCommon()
29 s.append(TString("float radians(float degrees);")); in BuiltInFunctionsCommon()
30 s.append(TString("vec2 radians(vec2 degrees);")); in BuiltInFunctionsCommon()
31 s.append(TString("vec3 radians(vec3 degrees);")); in BuiltInFunctionsCommon()
32 s.append(TString("vec4 radians(vec4 degrees);")); in BuiltInFunctionsCommon()
34 s.append(TString("float degrees(float radians);")); in BuiltInFunctionsCommon()
35 s.append(TString("vec2 degrees(vec2 radians);")); in BuiltInFunctionsCommon()
36 s.append(TString("vec3 degrees(vec3 radians);")); in BuiltInFunctionsCommon()
37 s.append(TString("vec4 degrees(vec4 radians);")); in BuiltInFunctionsCommon()
39 s.append(TString("float sin(float angle);")); in BuiltInFunctionsCommon()
40 s.append(TString("vec2 sin(vec2 angle);")); in BuiltInFunctionsCommon()
41 s.append(TString("vec3 sin(vec3 angle);")); in BuiltInFunctionsCommon()
42 s.append(TString("vec4 sin(vec4 angle);")); in BuiltInFunctionsCommon()
44 s.append(TString("float cos(float angle);")); in BuiltInFunctionsCommon()
45 s.append(TString("vec2 cos(vec2 angle);")); in BuiltInFunctionsCommon()
46 s.append(TString("vec3 cos(vec3 angle);")); in BuiltInFunctionsCommon()
47 s.append(TString("vec4 cos(vec4 angle);")); in BuiltInFunctionsCommon()
49 s.append(TString("float tan(float angle);")); in BuiltInFunctionsCommon()
50 s.append(TString("vec2 tan(vec2 angle);")); in BuiltInFunctionsCommon()
51 s.append(TString("vec3 tan(vec3 angle);")); in BuiltInFunctionsCommon()
52 s.append(TString("vec4 tan(vec4 angle);")); in BuiltInFunctionsCommon()
54 s.append(TString("float asin(float x);")); in BuiltInFunctionsCommon()
55 s.append(TString("vec2 asin(vec2 x);")); in BuiltInFunctionsCommon()
56 s.append(TString("vec3 asin(vec3 x);")); in BuiltInFunctionsCommon()
57 s.append(TString("vec4 asin(vec4 x);")); in BuiltInFunctionsCommon()
59 s.append(TString("float acos(float x);")); in BuiltInFunctionsCommon()
60 s.append(TString("vec2 acos(vec2 x);")); in BuiltInFunctionsCommon()
61 s.append(TString("vec3 acos(vec3 x);")); in BuiltInFunctionsCommon()
62 s.append(TString("vec4 acos(vec4 x);")); in BuiltInFunctionsCommon()
64 s.append(TString("float atan(float y, float x);")); in BuiltInFunctionsCommon()
65 s.append(TString("vec2 atan(vec2 y, vec2 x);")); in BuiltInFunctionsCommon()
66 s.append(TString("vec3 atan(vec3 y, vec3 x);")); in BuiltInFunctionsCommon()
67 s.append(TString("vec4 atan(vec4 y, vec4 x);")); in BuiltInFunctionsCommon()
69 s.append(TString("float atan(float y_over_x);")); in BuiltInFunctionsCommon()
70 s.append(TString("vec2 atan(vec2 y_over_x);")); in BuiltInFunctionsCommon()
71 s.append(TString("vec3 atan(vec3 y_over_x);")); in BuiltInFunctionsCommon()
72 s.append(TString("vec4 atan(vec4 y_over_x);")); in BuiltInFunctionsCommon()
77 s.append(TString("float pow(float x, float y);")); in BuiltInFunctionsCommon()
78 s.append(TString("vec2 pow(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
79 s.append(TString("vec3 pow(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
80 s.append(TString("vec4 pow(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
82 s.append(TString("float exp(float x);")); in BuiltInFunctionsCommon()
83 s.append(TString("vec2 exp(vec2 x);")); in BuiltInFunctionsCommon()
84 s.append(TString("vec3 exp(vec3 x);")); in BuiltInFunctionsCommon()
85 s.append(TString("vec4 exp(vec4 x);")); in BuiltInFunctionsCommon()
87 s.append(TString("float log(float x);")); in BuiltInFunctionsCommon()
88 s.append(TString("vec2 log(vec2 x);")); in BuiltInFunctionsCommon()
89 s.append(TString("vec3 log(vec3 x);")); in BuiltInFunctionsCommon()
90 s.append(TString("vec4 log(vec4 x);")); in BuiltInFunctionsCommon()
92 s.append(TString("float exp2(float x);")); in BuiltInFunctionsCommon()
93 s.append(TString("vec2 exp2(vec2 x);")); in BuiltInFunctionsCommon()
94 s.append(TString("vec3 exp2(vec3 x);")); in BuiltInFunctionsCommon()
95 s.append(TString("vec4 exp2(vec4 x);")); in BuiltInFunctionsCommon()
97 s.append(TString("float log2(float x);")); in BuiltInFunctionsCommon()
98 s.append(TString("vec2 log2(vec2 x);")); in BuiltInFunctionsCommon()
99 s.append(TString("vec3 log2(vec3 x);")); in BuiltInFunctionsCommon()
100 s.append(TString("vec4 log2(vec4 x);")); in BuiltInFunctionsCommon()
102 s.append(TString("float sqrt(float x);")); in BuiltInFunctionsCommon()
103 s.append(TString("vec2 sqrt(vec2 x);")); in BuiltInFunctionsCommon()
104 s.append(TString("vec3 sqrt(vec3 x);")); in BuiltInFunctionsCommon()
105 s.append(TString("vec4 sqrt(vec4 x);")); in BuiltInFunctionsCommon()
107 s.append(TString("float inversesqrt(float x);")); in BuiltInFunctionsCommon()
108 s.append(TString("vec2 inversesqrt(vec2 x);")); in BuiltInFunctionsCommon()
109 s.append(TString("vec3 inversesqrt(vec3 x);")); in BuiltInFunctionsCommon()
110 s.append(TString("vec4 inversesqrt(vec4 x);")); in BuiltInFunctionsCommon()
115 s.append(TString("float abs(float x);")); in BuiltInFunctionsCommon()
116 s.append(TString("vec2 abs(vec2 x);")); in BuiltInFunctionsCommon()
117 s.append(TString("vec3 abs(vec3 x);")); in BuiltInFunctionsCommon()
118 s.append(TString("vec4 abs(vec4 x);")); in BuiltInFunctionsCommon()
120 s.append(TString("float sign(float x);")); in BuiltInFunctionsCommon()
121 s.append(TString("vec2 sign(vec2 x);")); in BuiltInFunctionsCommon()
122 s.append(TString("vec3 sign(vec3 x);")); in BuiltInFunctionsCommon()
123 s.append(TString("vec4 sign(vec4 x);")); in BuiltInFunctionsCommon()
125 s.append(TString("float floor(float x);")); in BuiltInFunctionsCommon()
126 s.append(TString("vec2 floor(vec2 x);")); in BuiltInFunctionsCommon()
127 s.append(TString("vec3 floor(vec3 x);")); in BuiltInFunctionsCommon()
128 s.append(TString("vec4 floor(vec4 x);")); in BuiltInFunctionsCommon()
130 s.append(TString("float ceil(float x);")); in BuiltInFunctionsCommon()
131 s.append(TString("vec2 ceil(vec2 x);")); in BuiltInFunctionsCommon()
132 s.append(TString("vec3 ceil(vec3 x);")); in BuiltInFunctionsCommon()
133 s.append(TString("vec4 ceil(vec4 x);")); in BuiltInFunctionsCommon()
135 s.append(TString("float fract(float x);")); in BuiltInFunctionsCommon()
136 s.append(TString("vec2 fract(vec2 x);")); in BuiltInFunctionsCommon()
137 s.append(TString("vec3 fract(vec3 x);")); in BuiltInFunctionsCommon()
138 s.append(TString("vec4 fract(vec4 x);")); in BuiltInFunctionsCommon()
140 s.append(TString("float mod(float x, float y);")); in BuiltInFunctionsCommon()
141 s.append(TString("vec2 mod(vec2 x, float y);")); in BuiltInFunctionsCommon()
142 s.append(TString("vec3 mod(vec3 x, float y);")); in BuiltInFunctionsCommon()
143 s.append(TString("vec4 mod(vec4 x, float y);")); in BuiltInFunctionsCommon()
144 s.append(TString("vec2 mod(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
145 s.append(TString("vec3 mod(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
146 s.append(TString("vec4 mod(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
148 s.append(TString("float min(float x, float y);")); in BuiltInFunctionsCommon()
149 s.append(TString("vec2 min(vec2 x, float y);")); in BuiltInFunctionsCommon()
150 s.append(TString("vec3 min(vec3 x, float y);")); in BuiltInFunctionsCommon()
151 s.append(TString("vec4 min(vec4 x, float y);")); in BuiltInFunctionsCommon()
152 s.append(TString("vec2 min(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
153 s.append(TString("vec3 min(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
154 s.append(TString("vec4 min(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
156 s.append(TString("float max(float x, float y);")); in BuiltInFunctionsCommon()
157 s.append(TString("vec2 max(vec2 x, float y);")); in BuiltInFunctionsCommon()
158 s.append(TString("vec3 max(vec3 x, float y);")); in BuiltInFunctionsCommon()
159 s.append(TString("vec4 max(vec4 x, float y);")); in BuiltInFunctionsCommon()
160 s.append(TString("vec2 max(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
161 s.append(TString("vec3 max(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
162 s.append(TString("vec4 max(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
164 s.append(TString("float clamp(float x, float minVal, float maxVal);")); in BuiltInFunctionsCommon()
165 s.append(TString("vec2 clamp(vec2 x, float minVal, float maxVal);")); in BuiltInFunctionsCommon()
166 s.append(TString("vec3 clamp(vec3 x, float minVal, float maxVal);")); in BuiltInFunctionsCommon()
167 s.append(TString("vec4 clamp(vec4 x, float minVal, float maxVal);")); in BuiltInFunctionsCommon()
168 s.append(TString("vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);")); in BuiltInFunctionsCommon()
169 s.append(TString("vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);")); in BuiltInFunctionsCommon()
170 s.append(TString("vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);")); in BuiltInFunctionsCommon()
172 s.append(TString("float mix(float x, float y, float a);")); in BuiltInFunctionsCommon()
173 s.append(TString("vec2 mix(vec2 x, vec2 y, float a);")); in BuiltInFunctionsCommon()
174 s.append(TString("vec3 mix(vec3 x, vec3 y, float a);")); in BuiltInFunctionsCommon()
175 s.append(TString("vec4 mix(vec4 x, vec4 y, float a);")); in BuiltInFunctionsCommon()
176 s.append(TString("vec2 mix(vec2 x, vec2 y, vec2 a);")); in BuiltInFunctionsCommon()
177 s.append(TString("vec3 mix(vec3 x, vec3 y, vec3 a);")); in BuiltInFunctionsCommon()
178 s.append(TString("vec4 mix(vec4 x, vec4 y, vec4 a);")); in BuiltInFunctionsCommon()
180 s.append(TString("float step(float edge, float x);")); in BuiltInFunctionsCommon()
181 s.append(TString("vec2 step(vec2 edge, vec2 x);")); in BuiltInFunctionsCommon()
182 s.append(TString("vec3 step(vec3 edge, vec3 x);")); in BuiltInFunctionsCommon()
183 s.append(TString("vec4 step(vec4 edge, vec4 x);")); in BuiltInFunctionsCommon()
184 s.append(TString("vec2 step(float edge, vec2 x);")); in BuiltInFunctionsCommon()
185 s.append(TString("vec3 step(float edge, vec3 x);")); in BuiltInFunctionsCommon()
186 s.append(TString("vec4 step(float edge, vec4 x);")); in BuiltInFunctionsCommon()
188 s.append(TString("float smoothstep(float edge0, float edge1, float x);")); in BuiltInFunctionsCommon()
189 s.append(TString("vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);")); in BuiltInFunctionsCommon()
190 s.append(TString("vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);")); in BuiltInFunctionsCommon()
191 s.append(TString("vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);")); in BuiltInFunctionsCommon()
192 s.append(TString("vec2 smoothstep(float edge0, float edge1, vec2 x);")); in BuiltInFunctionsCommon()
193 s.append(TString("vec3 smoothstep(float edge0, float edge1, vec3 x);")); in BuiltInFunctionsCommon()
194 s.append(TString("vec4 smoothstep(float edge0, float edge1, vec4 x);")); in BuiltInFunctionsCommon()
199 s.append(TString("float length(float x);")); in BuiltInFunctionsCommon()
200 s.append(TString("float length(vec2 x);")); in BuiltInFunctionsCommon()
201 s.append(TString("float length(vec3 x);")); in BuiltInFunctionsCommon()
202 s.append(TString("float length(vec4 x);")); in BuiltInFunctionsCommon()
204 s.append(TString("float distance(float p0, float p1);")); in BuiltInFunctionsCommon()
205 s.append(TString("float distance(vec2 p0, vec2 p1);")); in BuiltInFunctionsCommon()
206 s.append(TString("float distance(vec3 p0, vec3 p1);")); in BuiltInFunctionsCommon()
207 s.append(TString("float distance(vec4 p0, vec4 p1);")); in BuiltInFunctionsCommon()
209 s.append(TString("float dot(float x, float y);")); in BuiltInFunctionsCommon()
210 s.append(TString("float dot(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
211 s.append(TString("float dot(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
212 s.append(TString("float dot(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
214 s.append(TString("vec3 cross(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
215 s.append(TString("float normalize(float x);")); in BuiltInFunctionsCommon()
216 s.append(TString("vec2 normalize(vec2 x);")); in BuiltInFunctionsCommon()
217 s.append(TString("vec3 normalize(vec3 x);")); in BuiltInFunctionsCommon()
218 s.append(TString("vec4 normalize(vec4 x);")); in BuiltInFunctionsCommon()
220 s.append(TString("float faceforward(float N, float I, float Nref);")); in BuiltInFunctionsCommon()
221 s.append(TString("vec2 faceforward(vec2 N, vec2 I, vec2 Nref);")); in BuiltInFunctionsCommon()
222 s.append(TString("vec3 faceforward(vec3 N, vec3 I, vec3 Nref);")); in BuiltInFunctionsCommon()
223 s.append(TString("vec4 faceforward(vec4 N, vec4 I, vec4 Nref);")); in BuiltInFunctionsCommon()
225 s.append(TString("float reflect(float I, float N);")); in BuiltInFunctionsCommon()
226 s.append(TString("vec2 reflect(vec2 I, vec2 N);")); in BuiltInFunctionsCommon()
227 s.append(TString("vec3 reflect(vec3 I, vec3 N);")); in BuiltInFunctionsCommon()
228 s.append(TString("vec4 reflect(vec4 I, vec4 N);")); in BuiltInFunctionsCommon()
230 s.append(TString("float refract(float I, float N, float eta);")); in BuiltInFunctionsCommon()
231 s.append(TString("vec2 refract(vec2 I, vec2 N, float eta);")); in BuiltInFunctionsCommon()
232 s.append(TString("vec3 refract(vec3 I, vec3 N, float eta);")); in BuiltInFunctionsCommon()
233 s.append(TString("vec4 refract(vec4 I, vec4 N, float eta);")); in BuiltInFunctionsCommon()
238 s.append(TString("mat2 matrixCompMult(mat2 x, mat2 y);")); in BuiltInFunctionsCommon()
239 s.append(TString("mat3 matrixCompMult(mat3 x, mat3 y);")); in BuiltInFunctionsCommon()
240 s.append(TString("mat4 matrixCompMult(mat4 x, mat4 y);")); in BuiltInFunctionsCommon()
245 s.append(TString("bvec2 lessThan(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
246 s.append(TString("bvec3 lessThan(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
247 s.append(TString("bvec4 lessThan(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
249 s.append(TString("bvec2 lessThan(ivec2 x, ivec2 y);")); in BuiltInFunctionsCommon()
250 s.append(TString("bvec3 lessThan(ivec3 x, ivec3 y);")); in BuiltInFunctionsCommon()
251 s.append(TString("bvec4 lessThan(ivec4 x, ivec4 y);")); in BuiltInFunctionsCommon()
253 s.append(TString("bvec2 lessThanEqual(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
254 s.append(TString("bvec3 lessThanEqual(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
255 s.append(TString("bvec4 lessThanEqual(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
257 s.append(TString("bvec2 lessThanEqual(ivec2 x, ivec2 y);")); in BuiltInFunctionsCommon()
258 s.append(TString("bvec3 lessThanEqual(ivec3 x, ivec3 y);")); in BuiltInFunctionsCommon()
259 s.append(TString("bvec4 lessThanEqual(ivec4 x, ivec4 y);")); in BuiltInFunctionsCommon()
261 s.append(TString("bvec2 greaterThan(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
262 s.append(TString("bvec3 greaterThan(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
263 s.append(TString("bvec4 greaterThan(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
265 s.append(TString("bvec2 greaterThan(ivec2 x, ivec2 y);")); in BuiltInFunctionsCommon()
266 s.append(TString("bvec3 greaterThan(ivec3 x, ivec3 y);")); in BuiltInFunctionsCommon()
267 s.append(TString("bvec4 greaterThan(ivec4 x, ivec4 y);")); in BuiltInFunctionsCommon()
269 s.append(TString("bvec2 greaterThanEqual(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
270 s.append(TString("bvec3 greaterThanEqual(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
271 s.append(TString("bvec4 greaterThanEqual(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
273 s.append(TString("bvec2 greaterThanEqual(ivec2 x, ivec2 y);")); in BuiltInFunctionsCommon()
274 s.append(TString("bvec3 greaterThanEqual(ivec3 x, ivec3 y);")); in BuiltInFunctionsCommon()
275 s.append(TString("bvec4 greaterThanEqual(ivec4 x, ivec4 y);")); in BuiltInFunctionsCommon()
277 s.append(TString("bvec2 equal(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
278 s.append(TString("bvec3 equal(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
279 s.append(TString("bvec4 equal(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
281 s.append(TString("bvec2 equal(ivec2 x, ivec2 y);")); in BuiltInFunctionsCommon()
282 s.append(TString("bvec3 equal(ivec3 x, ivec3 y);")); in BuiltInFunctionsCommon()
283 s.append(TString("bvec4 equal(ivec4 x, ivec4 y);")); in BuiltInFunctionsCommon()
285 s.append(TString("bvec2 equal(bvec2 x, bvec2 y);")); in BuiltInFunctionsCommon()
286 s.append(TString("bvec3 equal(bvec3 x, bvec3 y);")); in BuiltInFunctionsCommon()
287 s.append(TString("bvec4 equal(bvec4 x, bvec4 y);")); in BuiltInFunctionsCommon()
289 s.append(TString("bvec2 notEqual(vec2 x, vec2 y);")); in BuiltInFunctionsCommon()
290 s.append(TString("bvec3 notEqual(vec3 x, vec3 y);")); in BuiltInFunctionsCommon()
291 s.append(TString("bvec4 notEqual(vec4 x, vec4 y);")); in BuiltInFunctionsCommon()
293 s.append(TString("bvec2 notEqual(ivec2 x, ivec2 y);")); in BuiltInFunctionsCommon()
294 s.append(TString("bvec3 notEqual(ivec3 x, ivec3 y);")); in BuiltInFunctionsCommon()
295 s.append(TString("bvec4 notEqual(ivec4 x, ivec4 y);")); in BuiltInFunctionsCommon()
297 s.append(TString("bvec2 notEqual(bvec2 x, bvec2 y);")); in BuiltInFunctionsCommon()
298 s.append(TString("bvec3 notEqual(bvec3 x, bvec3 y);")); in BuiltInFunctionsCommon()
299 s.append(TString("bvec4 notEqual(bvec4 x, bvec4 y);")); in BuiltInFunctionsCommon()
301 s.append(TString("bool any(bvec2 x);")); in BuiltInFunctionsCommon()
302 s.append(TString("bool any(bvec3 x);")); in BuiltInFunctionsCommon()
303 s.append(TString("bool any(bvec4 x);")); in BuiltInFunctionsCommon()
305 s.append(TString("bool all(bvec2 x);")); in BuiltInFunctionsCommon()
306 s.append(TString("bool all(bvec3 x);")); in BuiltInFunctionsCommon()
307 s.append(TString("bool all(bvec4 x);")); in BuiltInFunctionsCommon()
309 s.append(TString("bvec2 not(bvec2 x);")); in BuiltInFunctionsCommon()
310 s.append(TString("bvec3 not(bvec3 x);")); in BuiltInFunctionsCommon()
311 s.append(TString("bvec4 not(bvec4 x);")); in BuiltInFunctionsCommon()
344 static TString BuiltInFunctionsVertex(const ShBuiltInResources& resources) in BuiltInFunctionsVertex()
346 TString s; in BuiltInFunctionsVertex()
357 s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord);")); in BuiltInFunctionsVertex()
358 s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord);")); in BuiltInFunctionsVertex()
359 s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord);")); in BuiltInFunctionsVertex()
360 s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord);")); in BuiltInFunctionsVertex()
362 s.append(TString("vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);")); in BuiltInFunctionsVertex()
363 s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);")); in BuiltInFunctionsVertex()
364 s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);")); in BuiltInFunctionsVertex()
365 s.append(TString("vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);")); in BuiltInFunctionsVertex()
376 static TString BuiltInFunctionsFragment(const ShBuiltInResources& resources) in BuiltInFunctionsFragment()
378 TString s; in BuiltInFunctionsFragment()
383 s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord);")); in BuiltInFunctionsFragment()
384 s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord);")); in BuiltInFunctionsFragment()
385 s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord);")); in BuiltInFunctionsFragment()
386 s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord);")); in BuiltInFunctionsFragment()
388 s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord, float bias);")); in BuiltInFunctionsFragment()
389 s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);")); in BuiltInFunctionsFragment()
390 s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);")); in BuiltInFunctionsFragment()
391 s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord, float bias);")); in BuiltInFunctionsFragment()
394 s.append(TString("float dFdx(float p);")); in BuiltInFunctionsFragment()
395 s.append(TString("vec2 dFdx(vec2 p);")); in BuiltInFunctionsFragment()
396 s.append(TString("vec3 dFdx(vec3 p);")); in BuiltInFunctionsFragment()
397 s.append(TString("vec4 dFdx(vec4 p);")); in BuiltInFunctionsFragment()
399 s.append(TString("float dFdy(float p);")); in BuiltInFunctionsFragment()
400 s.append(TString("vec2 dFdy(vec2 p);")); in BuiltInFunctionsFragment()
401 s.append(TString("vec3 dFdy(vec3 p);")); in BuiltInFunctionsFragment()
402 s.append(TString("vec4 dFdy(vec4 p);")); in BuiltInFunctionsFragment()
404 s.append(TString("float fwidth(float p);")); in BuiltInFunctionsFragment()
405 s.append(TString("vec2 fwidth(vec2 p);")); in BuiltInFunctionsFragment()
406 s.append(TString("vec3 fwidth(vec3 p);")); in BuiltInFunctionsFragment()
407 s.append(TString("vec4 fwidth(vec4 p);")); in BuiltInFunctionsFragment()
418 static TString StandardUniforms() in StandardUniforms()
420 TString s; in StandardUniforms()
425 s.append(TString("struct gl_DepthRangeParameters {")); in StandardUniforms()
426 s.append(TString(" highp float near;")); // n in StandardUniforms()
427 s.append(TString(" highp float far;")); // f in StandardUniforms()
428 s.append(TString(" highp float diff;")); // f - n in StandardUniforms()
429 s.append(TString("};")); in StandardUniforms()
430 s.append(TString("uniform gl_DepthRangeParameters gl_DepthRange;")); in StandardUniforms()
440 static TString DefaultPrecisionVertex() in DefaultPrecisionVertex()
442 TString s; in DefaultPrecisionVertex()
444 s.append(TString("precision highp int;")); in DefaultPrecisionVertex()
445 s.append(TString("precision highp float;")); in DefaultPrecisionVertex()
455 static TString DefaultPrecisionFragment() in DefaultPrecisionFragment()
457 TString s; in DefaultPrecisionFragment()
459 s.append(TString("precision mediump int;")); in DefaultPrecisionFragment()
470 static TString BuiltInConstants(const ShBuiltInResources &resources) in BuiltInConstants()