Wallpaper Engine

Wallpaper Engine

View Stats:
-LN-Jupper Feb 1, 2021 @ 2:36pm
Shader configuration : Custom uniforms
Hello there ! I´ve recently bought this program because I read it allows you to put a custom shader as a wallpaper.

I´ve read this post https://steamcommunity.com/sharedfiles/filedetails/?id=770803636

But im really confused in where to press what to make a fragment shader work.

Could someone make a video to show me how to configure it ?

Also : Is there any way you can configure custom uniforms? I´ve only want to put the mouse position as a uniform so my effect respond to where my mouse is.

Thank you so much! nice program
< >
Showing 1-5 of 5 comments
Biohazard  [developer] Feb 1, 2021 @ 3:07pm 
Hi, thank you!

The guides on Steam are out of date unfortunately, we've updated them now to link to the new documentation website here: https://docs.wallpaperengine.io/en/scene/shader/overview.html

This should hopefully be a bit more helpful.

Wallpaper Engine comes with a built-in shader editor now that you can use by creating a new image effect and you can even share your custom shader on the Workshop for others to re-use. The mouse position is a built-in uniform called g_PointerPosition ( https://docs.wallpaperengine.io/en/scene/shader/variables.html#general ), you can use the menu of the shader editor to automatically add this uniform for you.

Let me know if you still get stuck somewhere. FYI, if you just want to have a shader without an underlying image as a wallpaper, you can add a "fullscreen" layer in the editor and add your custom shader to that.
Last edited by Biohazard; Feb 1, 2021 @ 3:08pm
-LN-Jupper Feb 1, 2021 @ 4:05pm 
Thanks for your quick anwser.

Actually i´ve managed to configure it exactly as i wanted to.

thanks for the tip of adding a fullscreen layer to it.

I´ve manage to even make work the uniforms.


The only thing missing for me is the hability to put a backbuffer, i mean, a texture that renders de previous frame, this is something i´ve used in a lot of shader editors. If you could add that , that would really be sick.

Anyway, this is already a dream come true for me, thank you so much.

Im going to try to make a lots of effects with different parameters and upload them to the showcase
Biohazard  [developer] Feb 1, 2021 @ 4:13pm 
Sure thing, sounds like you got everything to work so far.

It's possible to define multiple passes and custom render targets in effects, but this isn't documented yet and not available in the editor either.

However I think if you choose the existing motion blur effect and create a new custom effect based on that, you'll get what you want (Click on "duplicate" instead of "new"). The motion blur effect is just using accumulation so it's doing the copy and read operations you're looking for, you may not even need to configure the effect further and just edit the shaders like before.

(FYI the backbuffer itself is always cleared right now and this can't be turned off. But the accumulation method should achieve the same, it just needs a few MB of extra VRAM for an additional render target this way.)
Last edited by Biohazard; Feb 1, 2021 @ 4:17pm
-LN-Jupper Feb 3, 2021 @ 2:00pm 
Hello ! Well , i´ve been trying and failing to add a "motion blur effect" to my current efect.

So i have a fullscreen asset, wich has a custom effect(wich is my shader, in this case is only a circle being draw ). So i´ve stock the effect wich is "motion blur" wich is supposed to accumulate the buffer. But for some reason is not working. The rest of the predefine effects seems to work perfect, but motion blur does not. Im not sure if doing something wrong.

Also i´ve tryed to add a motion blur effect and then duplicated. I know that all current effects are mostly shaders(for the way they look) but i does not seem to be an option where i can modify the code of the predefine effects, that would be sick.

I really love shaders, and I already love that you make the programm somewhat shader oriented. It would be awsome if you could download custom effects based on shaders and allow users to upload there own shader effects.

It would also be awsome to have like a Hue rotate or other effects that i´ve imagine that could be cool.

I do have a software with lots of shaders ready to be ported to anysoftware you can check it here : https://mmtt.com.ar/Guipper/. If you are looking for some colaboration or exchange of data let me know. Maybe we can improve our works together.


Biohazard  [developer] Feb 3, 2021 @ 2:56pm 
Hi. Perhaps try doing this in a new project first, then you can still add it to your current project:

- Create a new project from any image. You can later use the fullscreen layer again and shaders only, but for now just pick an image for testing purposes.
- Add a new effect to the image. Select the motion blur effect but don't click OK, instead click on "Duplicate" and enter a new name for your effect.
- Now you can edit the accumulation and the combine shaders like you were able to edit other shaders before, but this time there are 4 options. For now just edit the accumulation pixel/fragment shader.

This is where you want to add your effects so that accumulation works.

For example add the g_Time uniform from the menu and then add an offset to the texture coords of the albedo sample:

vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy + vec2(sin(g_Time) * 0.1, 0));

Now click OK.

By default the accumulation effect is very fast, so reduce the slider that says "accumulation rate" at the bottom to a low number like 0.1. Now you should be able to see the image leaving a trail, because it samples from the past frame and combines the current and past frame every time.

I think you can use this to achieve what you need. If you want to use this shader only, you can add your custom code right here and output it to the albedo variable, then it gets merged with the past frame in the rest of the same shader. This allows you to even manipulate the texture coordinates used to sample the past frame if you want to. Or you could just add the motion blur effect as-is, without modifications, after your custom effects. It just merges the past frame with the current frame based on the accumulation rate ratio, so maybe this is already enough?


You can share and download effects from others from the asset sharing menu: https://docs.wallpaperengine.io/en/scene/assets/sharing.html
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Feb 1, 2021 @ 2:36pm
Posts: 5