yes
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name" : "Skew",
|
||||
"description" : "Skews the image corners.",
|
||||
"group" : "distort",
|
||||
//"preview" : "preview/project.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"material" : "materials/effects/skew.json"
|
||||
}
|
||||
],
|
||||
"dependencies" :
|
||||
[
|
||||
"materials/effects/skew.json",
|
||||
"shaders/effects/skew.frag",
|
||||
"shaders/effects/skew.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/skew",
|
||||
"blending": "normal",
|
||||
"depthtest": "disabled",
|
||||
"depthwrite": "disabled",
|
||||
"cullmode": "nocull"
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"autosize" : true,
|
||||
"material" : "materials/effectpreview.json"
|
||||
}
|
||||
18
modules/wallpaper-engine/effects/skew/preview/project.json
Normal file
18
modules/wallpaper-engine/effects/skew/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"
|
||||
}
|
||||
70
modules/wallpaper-engine/effects/skew/preview/scene.json
Normal file
70
modules/wallpaper-engine/effects/skew/preview/scene.json
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"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,
|
||||
"depth" : 1,
|
||||
"effects" :
|
||||
[
|
||||
{
|
||||
"file" : "effects/skew/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"combos" :
|
||||
{
|
||||
"MODE" : 1
|
||||
},
|
||||
"constantshadervalues" :
|
||||
{
|
||||
"Bottom" : -0.18999999761581421,
|
||||
"Left" : -0.18999999761581421,
|
||||
"Right" : 0.18999999761581421,
|
||||
"Top" : 0.18999999761581421
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
// [COMBO] {"material":"Repeat","combo":"REPEAT","type":"options","default":1}
|
||||
|
||||
varying vec2 v_TexCoord;
|
||||
|
||||
uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true}
|
||||
|
||||
void main() {
|
||||
vec2 texCoord = v_TexCoord.xy;
|
||||
#if REPEAT
|
||||
texCoord = frac(texCoord);
|
||||
#endif
|
||||
gl_FragColor = texSample2D(g_Texture0, texCoord);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}}
|
||||
|
||||
#include "common.h"
|
||||
|
||||
uniform mat4 g_ModelViewProjectionMatrix;
|
||||
uniform vec4 g_Texture0Resolution;
|
||||
|
||||
uniform float g_Top; // {"material":"Top","default":0.0,"range":[-2,2]}
|
||||
uniform float g_Bottom; // {"material":"Bottom","default":0.0,"range":[-2,2]}
|
||||
uniform float g_Left; // {"material":"Left","default":0.0,"range":[-2,2]}
|
||||
uniform float g_Right; // {"material":"Right","default":0.0,"range":[-2,2]}
|
||||
|
||||
attribute vec3 a_Position;
|
||||
attribute vec2 a_TexCoord;
|
||||
|
||||
varying vec2 v_TexCoord;
|
||||
|
||||
void main() {
|
||||
|
||||
vec3 position = a_Position;
|
||||
|
||||
#if MODE == 1
|
||||
vec2 textureScale = g_Texture0Resolution.zw;
|
||||
position.x += textureScale.x * 1.0 * (step(a_TexCoord.y, 0.5) * g_Top +
|
||||
step(0.5, a_TexCoord.y) * g_Bottom);
|
||||
position.y += textureScale.y * 1.0 * (step(a_TexCoord.x, 0.5) * g_Left +
|
||||
step(0.5, a_TexCoord.x) * g_Right);
|
||||
#endif
|
||||
gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix);
|
||||
|
||||
|
||||
v_TexCoord.xy = a_TexCoord;
|
||||
|
||||
#if MODE == 0
|
||||
v_TexCoord.x -= step(a_TexCoord.y, 0.5) * g_Top +
|
||||
step(0.5, a_TexCoord.y) * g_Bottom;
|
||||
v_TexCoord.y += step(a_TexCoord.x, 0.5) * g_Left +
|
||||
step(0.5, a_TexCoord.x) * g_Right;
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "FX Preview",
|
||||
"type": "scene2d"
|
||||
}
|
||||
Reference in New Issue
Block a user