Home
last modified time | relevance | path

Searched refs:vec2 (Results 1 – 25 of 51) sorted by relevance

123

/frameworks/libs/systemui/weathereffects/graphics/assets/shaders/
Dsimplex2d.agsl20 half2 hash2d(vec2 p) {
21 p = vec2(dot(p,vec2(157.1, 235.7)), dot(p,vec2(573.5, 13.3)));
25 half hash1d(vec2 p) {
26 return fract(sin(dot(p, vec2(343.0, 49.0)))) * 2. -1.; // [-1, 1]
29 vec2 getVectorFromAngle(float theta) {
30 return vec2(cos(theta), sin(theta));
38 vec2 ihash2d(vec2 p) {
47 return vec2(cos(af), sin(af));
52 float kernel_summation(vec2 v0, vec2 v1, vec2 v2, vec2 g0, vec2 g1, vec2 g2) {
76 float simplex2d_flow(vec2 p, float rot, float time) {
[all …]
Dutils.agsl18 highp float idGenerator(vec2 point) {
19 vec2 p = fract(point * vec2(723.123, 236.209));
25 return idGenerator(vec2(value, 1.412));
29 float triangleNoise(vec2 n) {
30 n = fract(n * vec2(5.3987, 5.4421));
31 n += dot(n.yx, n.xy + vec2(21.5351, 14.3137));
38 float valueNoise(vec2 fragCoord) {
41 vec2 f = fract(fragCoord * scale);
44 float b = idGenerator(i + vec2(1.0, 0.0));
45 float c = idGenerator(i + vec2(0.0, 1.0));
[all …]
Drain_splash.agsl22 float drawSplash(vec2 cellUv, float cellTime) {
34 vec2 uvAbs = abs(cellUv);
37 vec2 center = vec2(0.22, -0.01);
39 float splashMaskCircle2 = sdfCircle(uvAbs - vec2(0.04, 0.) - center, 0.164);
48 float circleMask = sdfCircle(cellUv - vec2(0., 0.15), -0.004);
54 vec2 maskMiddle = vec2(-0.1, -0.5);
74 smoothstep(0.008, -0.156, sdfCircle(cellUv - vec2(0., lineCenter), 0.164));
79 vec2 lineMaskMiddle = vec2(-0.01, 2.71);
Dfog_effect.agsl43 vec2 timeForeground = vec2(time.x, time.y);
44 vec2 timeBackground = vec2(time.z, time.w);
75 vec2(timeBackground * 1.5) +
77 vec2(bgdDither * 7));
83 vec2(timeBackground * 5.5) +
85 vec2(bgdDither * 22));
91 vec2(timeForeground * 10.) +
93 vec2(bgdFogFar.b * 70., bgdFogFar.g * 10) +
95 vec2(fgdDither * 10));
99 vec2(timeForeground * 72.) +
[all …]
Dglass_rain.agsl18 highp vec2 drop;
20 highp vec2 dropplets;
23 highp vec2 cellUv;
41 in vec2 uv,
44 in vec2 rainGridSize,
47 vec2 dropPos = vec2(0.);
49 vec2 trailDropsPos = vec2(0.);
59 vec2 gridUv = uv * rainGridSize;
70 vec2 cellUv = fract(gridUv) - 0.5;
152 vec3 generateStaticGlassRain(vec2 uv, half screenAspectRatio, half time, half intensity) {
[all …]
Drain_shower_layer.agsl41 vec3 drawSplashes(vec2 uv, vec2 fragCoord, vec3 color) {
43 vec2 gridSize = vec2(15., 15.);
47 vec2 gridUv = uv * gridSize;
55 vec2 cellUv = fract(gridUv) - 0.5;
56 vec2 pixUv = cellUv;
58 vec2 pixDistance = screenSize * pixUv / gridSize;
73 float cellId = idGenerator(floor(gridUv) + vec2(circletime, 23.14));
94 uv = rotateAroundPoint(uv, vec2(0.5, -1.42), variation * PI / 9.);
101 /* Grid size = */ vec2(20.0, 2.0),
111 /* Grid size = */ vec2(30.0, 4.0),
[all …]
Dsnow.agsl19 highp vec2 cellUv;
48 in vec2 uv,
51 in vec2 snowGridSize,
73 vec2 gridUv = uv * snowGridSize;
88 vec2 cellUv = fract(gridUv) - 0.5;
95 half cellIntensity = idGenerator(floor(vec2(cellId * 856.16, 272.2)));
148 vec2 snowFlakeShape = vec2(1., 1.2);
149 vec2 snowFlakePos = vec2(snowFlakePosUncorrected / cellAspectRatio, cellUv.y);
150 snowFlakePos -= vec2(0., uv.y - 0.5) * cellId;
152 vec2 snowFlakeShapeVariation = vec2(0.055) * // max variation
[all …]
Drain_shower.agsl19 highp vec2 cellUv;
37 in vec2 uv,
40 in vec2 rainGridSize,
49 vec2 gridUv = uv * rainGridSize;
63 vec2 cellUv = fract(gridUv) - 0.5;
65 float intensity = idGenerator(floor(vec2(cellId * 8.16, 27.2)));
82 vec2 dropPos = cellUv;
85 dropPos *= scaleVariation * vec2(14.2, 2.728);
92 1. - length(vec2(dropPos.x, (dropPos.y - dropPos.x * dropPos.x)))
Dsnow_accumulation.agsl24 float random(vec2 uv) {
25 return fract(sin(dot(uv, vec2(14.53898, 56.233))) * 45312.644263742);
30 vec2 uv = fragCoord / imageWidth;
34 float aN = foreground.eval(fragCoord + vec2(0., distance)).a;
35 float aS = foreground.eval(fragCoord + vec2(0., -distance)).a;
Drain_glass_layer.agsl30 fragCoord += vec2(valueNoise(fragCoord) * 0.015 - 0.0025);
39 /* Grid size = */ vec2(4.0, 2.0),
44 vec2 dropUvMasked = smallDrippingRain.drop * dropMask;
45 vec2 droppletsUvMasked = smallDrippingRain.dropplets * droppletsMask;
52 /* Grid size = */ vec2(3.5, 1.5),
71 vec2 uvDiffractionOffsets =
73 vec2 s = screenSize;
Dsnow_effect.agsl45 float2 uvAdjusted = vec2(uv.x, uv.y / screenAspectRatio);
75 /* Grid size = */ vec2(7., 1.5),
89 vec3 cloudsNoise = noise.eval(uvAdjusted * 7000 + vec2(fragCoord.y, -fragCoord.x)).rgb;
94 vec2 accSnow = accumulatedSnow.eval(adjustedUvForeground).rg;
115 /* Grid size = */ vec2(7., 1.5),
Doutline.agsl27 float aN = texture.eval(fragCoord + vec2(0., thickness)).a;
28 float aS = texture.eval(fragCoord + vec2(0., -thickness)).a;
/frameworks/av/media/libstagefright/renderfright/gl/
DGLSkiaShadowPort.cpp230 Mesh::VertexArray<vec2>& position, in fillInCircleVerts()
244 vec2 center = vec2(bounds.getWidth() / 2.0f, bounds.getHeight() / 2.0f); in fillInCircleVerts()
249 position[vertexCount] = center + vec2(-octOffset * halfWidth, -halfWidth); in fillInCircleVerts()
254 position[vertexCount] = center + vec2(octOffset * halfWidth, -halfWidth); in fillInCircleVerts()
259 position[vertexCount] = center + vec2(halfWidth, -octOffset * halfWidth); in fillInCircleVerts()
264 position[vertexCount] = center + vec2(halfWidth, octOffset * halfWidth); in fillInCircleVerts()
269 position[vertexCount] = center + vec2(octOffset * halfWidth, halfWidth); in fillInCircleVerts()
274 position[vertexCount] = center + vec2(-octOffset * halfWidth, halfWidth); in fillInCircleVerts()
279 position[vertexCount] = center + vec2(-halfWidth, octOffset * halfWidth); in fillInCircleVerts()
284 position[vertexCount] = center + vec2(-halfWidth, -octOffset * halfWidth); in fillInCircleVerts()
[all …]
DGLShadowVertexGenerator.cpp69 void GLShadowVertexGenerator::fillVertices(Mesh::VertexArray<vec2>& position, in fillVertices()
78 Mesh::VertexArray<vec2>(position, mAmbientShadowVertexCount), in fillVertices()
DGLESRenderEngine.cpp573 Mesh::VertexArray<vec2> position(mesh.getPositionArray<vec2>()); in fillRegionWithColor()
781 Mesh::VertexArray<vec2> cropCoords(mesh.getCropCoordArray<vec2>()); in setupLayerCropping()
782 cropCoords[0] = vec2(cropWin.left, cropWin.top); in setupLayerCropping()
783 cropCoords[1] = vec2(cropWin.left, cropWin.top + cropWin.getHeight()); in setupLayerCropping()
784 cropCoords[2] = vec2(cropWin.right, cropWin.top + cropWin.getHeight()); in setupLayerCropping()
785 cropCoords[3] = vec2(cropWin.right, cropWin.top); in setupLayerCropping()
1152 Mesh::VertexArray<vec2> position(mesh.getPositionArray<vec2>()); in drawLayers()
1153 position[0] = vec2(bounds.left, bounds.top); in drawLayers()
1154 position[1] = vec2(bounds.left, bounds.bottom); in drawLayers()
1155 position[2] = vec2(bounds.right, bounds.bottom); in drawLayers()
[all …]
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/
Dnumeric.h67 static inline vec2i Round(const vec2& v) { in Round()
83 static inline vec2 MapPoint(const vec2& pt, const R1& from, const R2& to) { in MapPoint()
84 vec2 normalized((pt - vec2(from.p1)).array() / vec2(from.GetSize()).array()); in MapPoint()
85 return (normalized * vec2(to.GetSize())) + vec2(to.p1); in MapPoint()
152 inline mat3 ScaleMatrix(const vec2& scale_xy) { in ScaleMatrix()
156 inline mat3 TranslationMatrix(const vec2& translation) { in TranslationMatrix()
164 inline vec2 TransformPoint(const mat3& m, const vec2& p) { in TransformPoint()
168 inline vec2 TransformVector(const mat3& m, const vec2& p) { in TransformVector()
/frameworks/base/core/res/res/raw/
Dcolor_fade_vert.vert3 attribute vec2 position;
4 attribute vec2 uv;
5 varying vec2 UV;
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/
DQuaternion.java55 double[] vec2 = normal(v2); in set() local
56 double[] axis = normal(cross(vec1, vec2)); in set()
57 double angle = Math.acos(dot(vec1, vec2)); in set()
63 double[] vec2 = normal(v2); in calcAngle() local
64 return Math.acos(Math.min(dot(vec1, vec2), 1)); in calcAngle()
69 double[] vec2 = normal(v2); in calcAxis() local
70 return normal(cross(vec1, vec2)); in calcAxis()
/frameworks/native/libs/ui/
DTransform.cpp229 vec2 Transform::transform(const vec2& v) const { in transform()
230 vec2 r; in transform()
246 vec2 Transform::transform(float x, float y) const { in transform()
247 return transform(vec2(x, y)); in transform()
256 vec2 lt( bounds.left, bounds.top ); in transform()
257 vec2 rt( bounds.right, bounds.top ); in transform()
258 vec2 lb( bounds.left, bounds.bottom ); in transform()
259 vec2 rb( bounds.right, bounds.bottom ); in transform()
282 vec2 lt(bounds.left, bounds.top); in transform()
283 vec2 rt(bounds.right, bounds.top); in transform()
[all …]
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/
Dball_physics.rscript60 float2 vec2 = vec * vec;
61 float len2 = vec2.x + vec2.y;
79 float2 vec2 = vec * vec;
80 float len2 = max(2.f, vec2.x + vec2.y);
/frameworks/native/libs/ui/include/ui/
DTransform.h94 vec2 transform(float x, float y) const;
103 vec2 transform(const vec2& v) const;
/frameworks/native/libs/ui/include_vndk/ui/
DTransform.h94 vec2 transform(float x, float y) const;
103 vec2 transform(const vec2& v) const;
/frameworks/native/include/ui/
DTransform.h94 vec2 transform(float x, float y) const;
103 vec2 transform(const vec2& v) const;
/frameworks/native/libs/input/
DInput.cpp193 inline vec2 roundTransformedCoords(vec2 p) { in roundTransformedCoords()
197 vec2 transformWithoutTranslation(const ui::Transform& transform, const vec2& xy) { in transformWithoutTranslation()
198 const vec2 transformedXy = transform.transform(xy); in transformWithoutTranslation()
199 const vec2 transformedOrigin = transform.transform(0, 0); in transformWithoutTranslation()
208 vec2 transformedPoint = transform.transform(x, y); in transformAngle()
212 const vec2 origin = transform.transform(0, 0); in transformAngle()
670 vec2 vals = mTransform.transform(getRawXCursorPosition(), getRawYCursorPosition()); in getXCursorPosition()
675 vec2 vals = mTransform.transform(getRawXCursorPosition(), getRawYCursorPosition()); in getYCursorPosition()
681 vec2 vals = inverse.transform(x, y); in setCursorPosition()
793 const vec2 cursor = transform.transform(mRawXCursorPosition, mRawYCursorPosition); in applyTransform()
[all …]
/frameworks/native/libs/math/tests/
Dmat_test.cpp304 mat2 m2(vec2(2)); in TEST_F()
315 mat2 m2(vec2(2)); in TEST_F()
338 EXPECT_EQ(mat2(vec2(-1, 0), in TEST_F()
339 vec2(0, -1)), m0); in TEST_F()
350 mat2 m1(vec2(1, 2), vec2(3, 4)); in TEST_F()
351 mat2 m2(vec2(1, 3), vec2(2, 4)); in TEST_F()
354 EXPECT_EQ(vec2(1, 4), diag(m1)); in TEST_F()

123