Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c095e4e authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12140224 from 4bc12a07 to 24Q4-release

Change-Id: I6f5a5c768f109b6b0a1b0a2b22000bd91889ddc7
parents edb6a88a 4bc12a07
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -70,6 +70,16 @@
            android:text="@string/button_snow"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toTopOf="@id/sunny"
            app:layout_constraintEnd_toEndOf="parent"
            android:layout_marginBottom="10dp"
            android:layout_marginEnd="20dp" />

        <Button
            android:id="@+id/sunny"
            android:text="@string/button_sunny"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toTopOf="@id/clear"
            app:layout_constraintEnd_toEndOf="parent"
            android:layout_marginBottom="10dp"
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
    <string name="button_rain" translatable="false">Rain</string>
    <string name="button_fog" translatable="false">Fog</string>
    <string name="button_snow" translatable="false">Snow</string>
    <string name="button_sunny" translatable="false">Sun</string>
    <string name="button_clear" translatable="false">Clear Weather</string>
    <string name="change_asset" translatable="false">Change Asset</string>
</resources>
+5 −0
Original line number Diff line number Diff line
@@ -112,6 +112,11 @@ class WallpaperEffectsDebugActivity : TorusViewerActivity() {
            updateWallpaper()
            setDebugText(context.getString(R.string.generating))
        }
        rootView.requireViewById<Button>(R.id.sunny).setOnClickListener {
            weatherEffect = WallpaperInfoContract.WeatherEffect.SUN
            updateWallpaper()
            setDebugText(context.getString(R.string.generating))
        }
        rootView.requireViewById<Button>(R.id.clear).setOnClickListener {
            weatherEffect = null

+17 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// TODO(b/347299395): to add flare
+6 −8
Original line number Diff line number Diff line
@@ -26,18 +26,16 @@ uniform half intensity;
#include "shaders/rain_constants.agsl"

vec4 main(float2 fragCoord) {
    // 0. Add a bit of noise so that the droplets are not perfect circles.
    fragCoord += vec2(valueNoise(fragCoord) * 0.015 - 0.0025);

    float2 uv = fragCoord / screenSize;
    // 0. Calculate UV and add a bit of noise so that the droplets are not perfect circles.
    float2 uv = vec2(valueNoise(fragCoord) * 0.015 - 0.0025) + fragCoord / screenSize;

    // 1. Generate small glass rain.
    GlassRain smallDrippingRain = generateGlassRain(
         uv,
         screenAspectRatio,
         time,
         time * 0.7,
         /* Grid size = */ vec2(4.0, 2.0),
         intensity);
         intensity * 0.6);
    float dropMask = smallDrippingRain.dropMask;
    float droppletsMask = smallDrippingRain.droppletsMask;
    float trailMask = smallDrippingRain.trailMask;
@@ -48,9 +46,9 @@ vec4 main(float2 fragCoord) {
    GlassRain medDrippingRain = generateGlassRain(
          uv,
          screenAspectRatio,
          time * 1.267,
          time * 0.8869,
          /* Grid size = */ vec2(3.5, 1.5),
          intensity);
          intensity * 0.6);

    // 3. Combine those two glass rains.
    dropMask = max(medDrippingRain.dropMask, dropMask);
Loading