yes
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name" : "Blend",
|
||||
"description" : "Blend two images or image layers with various blend modes.",
|
||||
"group" : "colorize",
|
||||
"preview" : "preview/project.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"material" : "materials/effects/blend.json"
|
||||
}
|
||||
],
|
||||
"dependencies" :
|
||||
[
|
||||
"materials/effects/blend.json",
|
||||
"shaders/effects/blend.frag",
|
||||
"shaders/effects/blend.vert"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name" : "Opacity",
|
||||
"description" : "Adds an opacity mask to the image.",
|
||||
"group" : "colorize",
|
||||
"preview" : "preview/project.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"material" : "materials/effects/opacity.json"
|
||||
}
|
||||
],
|
||||
"dependencies" :
|
||||
[
|
||||
"materials/effects/opacity.json",
|
||||
"shaders/effects/opacity.frag",
|
||||
"shaders/effects/opacity.vert"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name" : "Shake",
|
||||
"description" : "Adds a shake animation. Only masked areas will be affected.",
|
||||
"group" : "animate",
|
||||
"preview" : "preview/project.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"material" : "materials/effects/shake.json"
|
||||
}
|
||||
],
|
||||
"dependencies" :
|
||||
[
|
||||
"materials/effects/shake.json",
|
||||
"shaders/effects/shake.frag",
|
||||
"shaders/effects/shake.vert"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name" : "Tint",
|
||||
"description" : "Tint the image with a color of choice.",
|
||||
"group" : "colorize",
|
||||
"preview" : "preview/project.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"material" : "materials/effects/tint.json"
|
||||
}
|
||||
],
|
||||
"dependencies" :
|
||||
[
|
||||
"materials/effects/tint.json",
|
||||
"shaders/effects/tint.frag",
|
||||
"shaders/effects/tint.vert"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"blending" : "translucent",
|
||||
"cullmode" : "nocull",
|
||||
"depthtest" : "disabled",
|
||||
"depthwrite" : "disabled",
|
||||
"shader" : "genericimage2",
|
||||
"textures" : [ "effectpreview" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"passes": [{
|
||||
"shader": "effects/blend",
|
||||
"blending": "normal",
|
||||
"depthtest": "disabled",
|
||||
"depthwrite": "disabled",
|
||||
"cullmode": "nocull"
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"passes": [{
|
||||
"shader": "effects/opacity",
|
||||
"blending": "normal",
|
||||
"depthtest": "disabled",
|
||||
"depthwrite": "disabled",
|
||||
"cullmode": "nocull"
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"passes": [{
|
||||
"shader": "effects/shake",
|
||||
"blending": "normal",
|
||||
"depthtest": "disabled",
|
||||
"depthwrite": "disabled",
|
||||
"cullmode": "nocull"
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"passes": [{
|
||||
"shader": "effects/tint",
|
||||
"blending": "normal",
|
||||
"depthtest": "disabled",
|
||||
"depthwrite": "disabled",
|
||||
"cullmode": "nocull"
|
||||
}]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"clampuvs" : true,
|
||||
"format" : "rgba8888",
|
||||
"nomip" : true,
|
||||
"nonpoweroftwo" : true
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"autosize" : true,
|
||||
"material" : "materials/effectpreview.json"
|
||||
}
|
||||
18
modules/wallpaper-engine/effects/shake/preview/project.json
Normal file
18
modules/wallpaper-engine/effects/shake/preview/project.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"file" : "scene.json",
|
||||
"general" :
|
||||
{
|
||||
"properties" :
|
||||
{
|
||||
"schemecolor" :
|
||||
{
|
||||
"order" : 0,
|
||||
"text" : "ui_browse_properties_scheme_color",
|
||||
"type" : "color",
|
||||
"value" : "0 0 0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title" : "preview",
|
||||
"type" : "scene"
|
||||
}
|
||||
186
modules/wallpaper-engine/effects/shake/preview/scene.json
Normal file
186
modules/wallpaper-engine/effects/shake/preview/scene.json
Normal file
@@ -0,0 +1,186 @@
|
||||
{
|
||||
"camera" :
|
||||
{
|
||||
"center" : "0.000 0.000 -1.000",
|
||||
"eye" : "0.000 0.000 0.000",
|
||||
"up" : "0.000 1.000 0.000"
|
||||
},
|
||||
"general" :
|
||||
{
|
||||
"ambientcolor" : "0.3 0.3 0.3",
|
||||
"bloom" : false,
|
||||
"bloomstrength" : 2,
|
||||
"bloomthreshold" : 0.64999997615814209,
|
||||
"cameraparallax" : false,
|
||||
"cameraparallaxamount" : 0.5,
|
||||
"cameraparallaxdelay" : 0.10000000149011612,
|
||||
"cameraparallaxmouseinfluence" : 0,
|
||||
"camerapreview" : true,
|
||||
"camerashake" : false,
|
||||
"camerashakeamplitude" : 0.5,
|
||||
"camerashakeroughness" : 1,
|
||||
"camerashakespeed" : 3,
|
||||
"clearcolor" : "0.7 0.7 0.7",
|
||||
"orthogonalprojection" :
|
||||
{
|
||||
"height" : 256,
|
||||
"width" : 256
|
||||
},
|
||||
"skylightcolor" : "0.3 0.3 0.3"
|
||||
},
|
||||
"objects" :
|
||||
[
|
||||
{
|
||||
"angles" : "0.000 0.000 0.000",
|
||||
"colorBlendMode" : 0,
|
||||
"copybackground" : true,
|
||||
"effects" :
|
||||
[
|
||||
{
|
||||
"file" : "effects/blend/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"combos" :
|
||||
{
|
||||
"BLENDMODE" : 0
|
||||
},
|
||||
"textures" :
|
||||
[
|
||||
null,
|
||||
"util/white",
|
||||
"masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"id" : 34,
|
||||
"image" : "models/effectpreview.json",
|
||||
"name" : "effectpreview",
|
||||
"origin" : "128.000 128.000 0.000",
|
||||
"parallaxDepth" : "1.000 1.000",
|
||||
"scale" : "1.000 1.000 1.000",
|
||||
"size" : "256.000 256.000",
|
||||
"visible" : true
|
||||
},
|
||||
{
|
||||
"angles" : "0.000 0.000 0.000",
|
||||
"colorBlendMode" : 0,
|
||||
"copybackground" : true,
|
||||
"depth" : 1,
|
||||
"effects" :
|
||||
[
|
||||
{
|
||||
"file" : "effects/opacity/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"textures" : [ null, "masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173" ]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"file" : "effects/shake/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"constantshadervalues" :
|
||||
{
|
||||
"Strength" : 0.30000001192092896
|
||||
},
|
||||
"textures" :
|
||||
[
|
||||
null,
|
||||
"masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8",
|
||||
"masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"id" : 38,
|
||||
"image" : "models/effectpreview.json",
|
||||
"name" : "",
|
||||
"origin" : "128.000 128.000 0.000",
|
||||
"parallaxDepth" : "1.000 1.000",
|
||||
"scale" : "1.000 1.000 1.000",
|
||||
"size" : "256.000 256.000",
|
||||
"visible" : true
|
||||
},
|
||||
{
|
||||
"angles" : "0.000 0.000 0.000",
|
||||
"colorBlendMode" : 0,
|
||||
"config" :
|
||||
{
|
||||
"passthrough" : true
|
||||
},
|
||||
"copybackground" : true,
|
||||
"effects" :
|
||||
[
|
||||
{
|
||||
"file" : "effects/shake/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"constantshadervalues" :
|
||||
{
|
||||
"Power" : 0.77999997138977051,
|
||||
"Speed" : 1,
|
||||
"Strength" : 0.14000000059604645
|
||||
},
|
||||
"textures" :
|
||||
[
|
||||
null,
|
||||
"masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354",
|
||||
"masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"id" : 46,
|
||||
"image" : "models/util/composelayer.json",
|
||||
"name" : "Compose",
|
||||
"origin" : "128.000 128.000 0.000",
|
||||
"parallaxDepth" : "1.000 1.000",
|
||||
"scale" : "1.000 1.000 1.000",
|
||||
"size" : "512.000 512.000",
|
||||
"visible" : true
|
||||
},
|
||||
{
|
||||
"angles" : "0.000 0.000 0.000",
|
||||
"colorBlendMode" : 0,
|
||||
"config" :
|
||||
{
|
||||
"passthrough" : true
|
||||
},
|
||||
"copybackground" : true,
|
||||
"effects" :
|
||||
[
|
||||
{
|
||||
"file" : "effects/shake/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"textures" :
|
||||
[
|
||||
null,
|
||||
"masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d",
|
||||
"masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"id" : 60,
|
||||
"image" : "models/util/composelayer.json",
|
||||
"name" : "Compose",
|
||||
"origin" : "128.000 128.000 0.000",
|
||||
"parallaxDepth" : "1.000 1.000",
|
||||
"scale" : "1.000 1.000 1.000",
|
||||
"size" : "512.000 512.000",
|
||||
"visible" : false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2}
|
||||
|
||||
#include "common_blending.h"
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
|
||||
uniform float g_Multiply; // {"material":"Multiply","default":1,"range":[0.0, 10.0]}
|
||||
|
||||
#if OPACITYMASK == 1
|
||||
varying vec2 v_TexCoordOpacity;
|
||||
#endif
|
||||
|
||||
uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true}
|
||||
uniform sampler2D g_Texture1; // {"material":"Blend texture","mode":"rgbmask","default":"util/white"}
|
||||
uniform sampler2D g_Texture2; // {"material":"Opacity mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK"}
|
||||
|
||||
void main() {
|
||||
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
|
||||
vec4 mask = texSample2D(g_Texture1, v_TexCoord.zw);
|
||||
float blend = mask.a * g_Multiply;
|
||||
|
||||
#if OPACITYMASK == 1
|
||||
blend *= texSample2D(g_Texture2, v_TexCoordOpacity).r;
|
||||
#endif
|
||||
|
||||
albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, mask.rgb, blend);
|
||||
|
||||
|
||||
gl_FragColor = albedo;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
uniform mat4 g_ModelViewProjectionMatrix;
|
||||
uniform vec4 g_Texture1Resolution;
|
||||
|
||||
#if OPACITYMASK == 1
|
||||
uniform vec4 g_Texture2Resolution;
|
||||
|
||||
varying vec2 v_TexCoordOpacity;
|
||||
#endif
|
||||
|
||||
attribute vec3 a_Position;
|
||||
attribute vec2 a_TexCoord;
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
|
||||
void main() {
|
||||
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
|
||||
v_TexCoord.xy = a_TexCoord;
|
||||
v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x,
|
||||
v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y);
|
||||
|
||||
#if OPACITYMASK == 1
|
||||
v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x,
|
||||
v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
|
||||
uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true}
|
||||
uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"}
|
||||
|
||||
void main() {
|
||||
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
|
||||
float mask = texSample2D(g_Texture1, v_TexCoord.zw).r;
|
||||
albedo.a *= mask;
|
||||
|
||||
gl_FragColor = albedo;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
uniform mat4 g_ModelViewProjectionMatrix;
|
||||
uniform vec4 g_Texture1Resolution;
|
||||
|
||||
attribute vec3 a_Position;
|
||||
attribute vec2 a_TexCoord;
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
|
||||
void main() {
|
||||
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
|
||||
v_TexCoord.xy = a_TexCoord;
|
||||
v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x,
|
||||
v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
varying vec2 v_Scroll;
|
||||
|
||||
uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true}
|
||||
uniform sampler2D g_Texture1; // {"material":"Flow map","mode":"flowmask","default":"util/noflow"}
|
||||
uniform sampler2D g_Texture2; // {"material":"Flow Phase","mode":"opacitymask","default":"util/white"}
|
||||
uniform float g_Time;
|
||||
|
||||
uniform float g_Speed; // {"material":"Speed","default":1,"range":[0.01, 10]}
|
||||
uniform float g_Amp; // {"material":"Strength","default":0.2,"range":[0.01, 1]}
|
||||
uniform float g_Power; // {"material":"Power","default":1,"range":[0.01, 2]}
|
||||
|
||||
void main() {
|
||||
|
||||
float flowPhase = texSample2D(g_Texture2, v_TexCoord.zw).r * 6.28;
|
||||
vec2 flowColors = texSample2D(g_Texture1, v_TexCoord.zw).rg;
|
||||
vec2 flowMask = (flowColors.rg - vec2(0.498, 0.498)) * 2.0;
|
||||
|
||||
float offset = sin(g_Speed * g_Time + flowPhase);
|
||||
offset = pow(abs(offset), g_Power) * sign(offset);
|
||||
|
||||
vec2 texCoord = v_TexCoord.xy + flowMask * offset * g_Amp * g_Amp;
|
||||
gl_FragColor = texSample2D(g_Texture0, texCoord);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
uniform mat4 g_ModelViewProjectionMatrix;
|
||||
uniform vec4 g_Texture1Resolution;
|
||||
|
||||
attribute vec3 a_Position;
|
||||
attribute vec2 a_TexCoord;
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
|
||||
void main() {
|
||||
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
|
||||
v_TexCoord.xy = a_TexCoord;
|
||||
v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x,
|
||||
v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2}
|
||||
|
||||
#include "common_blending.h"
|
||||
|
||||
varying vec2 v_TexCoord;
|
||||
|
||||
uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true}
|
||||
|
||||
uniform float g_BlendAlpha; // {"material":"Alpha","default":1,"range":[0,1]}
|
||||
uniform vec3 g_TintColor; // {"material":"Color", "type": "color", "default":"1 1 1"}
|
||||
|
||||
void main() {
|
||||
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
|
||||
|
||||
albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, g_BlendAlpha);
|
||||
|
||||
gl_FragColor = albedo;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
uniform mat4 g_ModelViewProjectionMatrix;
|
||||
|
||||
attribute vec3 a_Position;
|
||||
attribute vec2 a_TexCoord;
|
||||
|
||||
varying vec2 v_TexCoord;
|
||||
|
||||
void main() {
|
||||
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
|
||||
v_TexCoord.xy = a_TexCoord;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "FX Preview",
|
||||
"type": "scene2d"
|
||||
}
|
||||
Reference in New Issue
Block a user