Lines Matching refs:Vec3
31 using tcu::Vec3;
92 "${VTX_IN} highp vec3 a_position;\n"
128 context.attributes.push_back(gls::VarSpec("a_position", Vec3(-0.1f), Vec3(0.1f)));
140 "${VTX_IN} highp vec3 a_position;\n"
163 context.attributes.push_back(gls::VarSpec("a_position", Vec3(-positionFactor), Vec3(positionFactor)));
182 "${VTX_IN} highp vec3 a_position;\n"
232 context.attributes.push_back(gls::VarSpec("a_position", Vec3(-0.1f), Vec3(0.1f)));
253 " mediump vec3 ambientColor;\n"
255 " mediump vec3 emissiveColor;\n"
256 " mediump vec3 specularColor;\n"
262 " mediump vec3 color;\n"
264 " mediump vec3 direction;\n"
271 "${VTX_IN} mediump vec3 a_normal${NS};\n"
272 "${VTX_IN} mediump vec3 a_color${NS};\n"
285 "${VTX_OUT} mediump vec3 v_eyeNormal${NS};\n"
286 "${VTX_OUT} mediump vec3 v_directionToLight${NS}[1];\n"
289 "vec3 direction (vec4 from, vec4 to)\n"
291 " return vec3(to.xyz * from.w - from.xyz * to.w);\n"
300 " mediump vec3 eyeNormal = normalize(u_normalMatrix${NS} * a_normal${NS});\n"
319 " mediump vec3 color;\n"
321 " mediump vec3 direction;\n"
329 " mediump vec3 ambientColor;\n"
331 " mediump vec3 emissiveColor;\n"
332 " mediump vec3 specularColor;\n"
343 "${FRAG_IN} mediump vec3 v_eyeNormal${NS};\n"
344 "${FRAG_IN} mediump vec3 v_directionToLight${NS}[1];\n"
347 "mediump vec3 computeLighting (Light light, mediump vec3 directionToLight, mediump vec3 vertexEyeNormal)\n"
350 " mediump vec3 color = normalDotDirection * u_material${NS}.diffuseColor.rgb * light.color;\n"
354 " mediump vec3 h = normalize(directionToLight + vec3(0.0, 0.0, 1.0));\n"
372 " mediump vec3 eyeNormal = normalize(v_eyeNormal${NS});\n"
385 context.attributes.push_back(gls::VarSpec("a_normal${NS}", Vec3(-1.0f), Vec3(1.0f)));
388 context.uniforms.push_back(gls::VarSpec("u_material${NS}.ambientColor", Vec3(0.0f), Vec3(1.0f)));
390 context.uniforms.push_back(gls::VarSpec("u_material${NS}.emissiveColor", Vec3(0.0f), Vec3(1.0f)));
391 context.uniforms.push_back(gls::VarSpec("u_material${NS}.specularColor", Vec3(0.0f), Vec3(1.0f)));
394 context.uniforms.push_back(gls::VarSpec("u_light${NS}[0].color", Vec3(0.0f), Vec3(1.0f)));
396 context.uniforms.push_back(gls::VarSpec("u_light${NS}[0].direction", Vec3(-1.0f), Vec3(1.0f)));
421 " mediump vec3 ambientColor;\n"
423 " mediump vec3 emissiveColor;\n"
424 " mediump vec3 specularColor;\n"
428 " mediump vec3 color;\n"
430 " mediump vec3 direction;\n"
438 "${VTX_IN} mediump vec3 a_normal${NS};\n"
451 "mediump vec3 direction (mediump vec4 from, mediump vec4 to)\n"
453 " return vec3(to.xyz * from.w - from.xyz * to.w);\n"
456 "mediump vec3 computeLighting (\n"
457 " mediump vec3 directionToLight,\n"
458 " mediump vec3 halfVector,\n"
459 " mediump vec3 normal,\n"
460 " mediump vec3 lightColor,\n"
461 " mediump vec3 diffuseColor,\n"
462 " mediump vec3 specularColor,\n"
466 " mediump vec3 color = normalDotDirection * diffuseColor * lightColor;\n"
480 " mediump vec3 directionToLight,\n"
481 " mediump vec3 lightDir,\n"
497 " highp vec3 normal = a_normal${NS};\n"
503 " mediump vec3 eyeNormal = normalize(u_normalMatrix${NS} * normal);\n"
506 " mediump vec3 directionToLight = -u_directionalLight${NS}[i].direction;\n"
507 " mediump vec3 halfVector = normalize(directionToLight + vec3(0.0, 0.0, 1.0));\n"
514 " mediump vec3 directionToLight = normalize(direction(eyePosition, u_spotLight${NS}[i].position));\n"
515 " mediump vec3 halfVector = normalize(directionToLight + vec3(0.0, 0.0, 1.0));\n"
539 context.attributes.push_back (gls::VarSpec("a_normal${NS}", Vec3(-1.0f), Vec3(1.0f)));
542 context.uniforms.push_back (gls::VarSpec("u_material${NS}.ambientColor", Vec3(0.0f), Vec3(1.0f)));
544 context.uniforms.push_back (gls::VarSpec("u_material${NS}.emissiveColor", Vec3(0.0f), Vec3(1.0f)));
545 context.uniforms.push_back (gls::VarSpec("u_material${NS}.specularColor", Vec3(0.0f), Vec3(1.0f)));
548 context.uniforms.push_back (gls::VarSpec("u_directionalLight${NS}[0].color", Vec3(0.0f), Vec3(1.0f)));
550 context.uniforms.push_back (gls::VarSpec("u_directionalLight${NS}[0].direction", Vec3(-1.0f), Vec3(1.0f)));
563 context.uniforms.push_back(gls::VarSpec("u_spotLight${NS}["+ndxStr+"].color", Vec3(0.0f), Vec3(1.0f)));
565 context.uniforms.push_back(gls::VarSpec("u_spotLight${NS}["+ndxStr+"].direction", Vec3(-1.0f), Vec3(1.0f)));