Giter Site home page Giter Site logo

win32customacrylic's Introduction

Win32CustomAcrylic

Using winrt API to realize custom acrylic synthesis effect

使用WInRT API实现自定义Acrylic合成效果

Windows.UI.Composition - Interop

Custom

  • BlurAmount(模糊度)
  • Saturation(饱和度)
  • NoiseTexture(噪点纹理)
  • NoiseOpacity(噪点透明度)
  • TintColor(着色)

Preview

blur.BlurAmount(40.f);

preview1

blur.BlurAmount(10.f);

preview2

Effect

The parameters of the effect are defined in CustomArylic::CreateEffects in CustomAcrylic.cpp

效果参数在 CustomAcrylic.cpp 中的 CustomArylic::CreateEffects 定义

blur.BlurAmount(40.f);
saturation.Saturation(2.f);
opacity.Opacity(0.03f);

Using

Nuget Package:

<package id="Microsoft.Graphics.Win2D" version="1.0.0.30" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.220224.4" targetFramework="native" />
<package id="Microsoft.Windows.SDK.BuildTools" version="10.0.22000.194" targetFramework="native" />
<package id="Microsoft.WindowsAppSDK" version="1.0.0" targetFramework="native" />

Environment(开发环境):

Visual Studio 2019
Windows SDK 10.0.18362.0

Tested

  • Windows 10 1809 17763.737
  • Windows 10 2004 19041.208
  • Windows 11 21H2 22000.556

Other versions are not tested, and theoretically support win10 1703 at least

其他版本未测试 理论上应该最低支持Win10 1703版本

Airspace Issue

acrylic effect is rendered using direct composition, So it always cause Airspace Issue

Therefore, you can only use DirectX or visual layer to render content

For information about direct2d and composition interoperability, please see composition-native-interop

空域问题

Acrylic效果使用composition接口渲染 因此会导致"空域"问题

因此您只能使用DirectX或者VisualLayer来渲染内容

有关Direct2D和composition的互操作请查看composition-native-interop

win32customacrylic's People

Contributors

maplespe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.