Lines Matching refs:vec3
84 +varying vec3 LightDir;
85 +varying vec3 EyeDir;
95 + vec3 ambient = vec3(0.25);
96 + vec3 litColor;
107 + vec3 SurfaceColor = texture2D(Tex, gl_TexCoord[0].st).xyz;
109 + vec3 normDelta = vec3(p.x, p.y, 1.0) * f;
111 + vec3 reflectDir = reflect(LightDir, normDelta);
115 + litColor = min(litColor + spec, vec3(1.0));
131 + vec3 SurfaceColor;
132 + vec3 WarmColor;
133 + vec3 CoolColor;
138 +varying vec3 ReflectVec;
139 +varying vec3 ViewVec;
144 + vec3 kcool = min(CoolColor + DiffuseCool * SurfaceColor, 1.0);
145 + vec3 kwarm = min(WarmColor + DiffuseWarm * SurfaceColor, 1.0);
146 + vec3 kfinal = mix(kcool, kwarm, NdotL);
148 + vec3 nreflect = normalize(ReflectVec);
149 + vec3 nview = normalize(ViewVec);
162 +vec3 LightPosition = vec3(0.0, 10.0, 4.0);
165 +varying vec3 ReflectVec;
166 +varying vec3 ViewVec;
170 + vec3 ecPos = vec3 (gl_ModelViewMatrix * gl_Vertex);
171 + vec3 tnorm = normalize(gl_NormalMatrix * gl_Normal);
172 + vec3 lightVec = normalize(LightPosition - ecPos);
225 +float permute(float x0,vec3 p) {
229 +vec2 permute(vec2 x0,vec3 p) {
233 +vec3 permute(vec3 x0,vec3 p) {
234 + vec3 x1 = mod(x0 * p.y, p.x);
237 +vec4 permute(vec4 x0,vec3 p) {
255 + const vec3 D = vec3( 0., 0.5, 2.0) * 3.14159265358979312;
269 + vec3 p = permute( permute(
270 + i.y + vec3(0., i1.y, 1. ), pParam.xyz)
271 + + i.x + vec3(0., i1.x, 1. ), pParam.xyz);
275 + vec3 x = fract(p / pParam.w) ;
276 + vec3 h = 0.5 - abs(x) ;
278 + vec3 sx = vec3(lessThan(x,D.xxx)) *2. -1.;
279 + vec3 sh = vec3(lessThan(h,D.xxx));
281 + vec3 a0 = x + sx*sh;
292 + vec3 g = 2.0 * vec3( dot(p0, x0), dot(p1, x1), dot(p2, x2) );
295 + vec3 phi = D.z * mod(p,pParam.w) /pParam.w ;
298 + vec3 g = vec3( dot(a0.xy, x0), dot(a0.zw, x1), dot(a1.xy, x2) );
301 + vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.);
306 +float simplexNoise3(vec3 v)
312 + vec3 i = floor(v + dot(v, C.yyy) );
313 + vec3 x0 = v - i + dot(i, C.xxx) ;
317 + vec3 g = vec3( greaterThan( x0.xyz, x0.yzx) );
318 + vec3 l = vec3( lessThanEqual( x0.xyz, x0.yzx) );
320 + vec3 i1 = g.xyz * l.zxy;
321 + vec3 i2 = max( g.xyz, l.zxy);
324 + vec3 q1;
329 + vec3 q2;
334 + vec3 q3;
339 + vec3 i1 = vec3(equal(q3.xxx, x0));
340 + vec3 i2 = i1 + vec3(equal(q3.yyy, x0));
344 + vec3 x1 = x0 - i1 + 1. * C.xxx;
345 + vec3 x2 = x0 - i2 + 2. * C.xxx;
346 + vec3 x3 = x0 - 1. + 3. * C.xxx;
358 + vec3 ns = n_ * D.wyz - D.xzx ;
379 + vec3 p0 = vec3(a0.xy,h.x);
380 + vec3 p1 = vec3(a0.zw,h.y);
381 + vec3 p2 = vec3(a1.xy,h.z);
382 + vec3 p3 = vec3(a1.zw,h.w);
404 + p.xyz = floor( fract (vec3(j) * ip.xyz) *pParam.w) * ip.z -1.0;
479 + vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.);
483 + return 32. * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))
508 + vec3 lightVec = vec3(0, 0, 1);
509 + vec3 norm = gl_NormalMatrix * gl_Normal;