This commit is contained in:
2025-04-29 13:39:02 -05:00
commit 9cbb583982
2257 changed files with 77258 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
{
"version" : 1,
"replacementkey" : "skew",
"name" : "ui_editor_effect_skew_title",
"description" : "ui_editor_effect_skew_description",
"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"
]
}

View File

@@ -0,0 +1,9 @@
{
"passes": [{
"shader": "effects/skew",
"blending": "normal",
"depthtest": "disabled",
"depthwrite": "disabled",
"cullmode": "nocull"
}]
}

View File

@@ -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"
]
}

View File

@@ -0,0 +1,13 @@
{
"passes" :
[
{
"blending" : "translucent",
"cullmode" : "nocull",
"depthtest" : "disabled",
"depthwrite" : "disabled",
"shader" : "genericimage2",
"textures" : [ "effectpreview" ]
}
]
}

View File

@@ -0,0 +1,6 @@
{
"clampuvs" : true,
"format" : "rgba8888",
"nomip" : true,
"nonpoweroftwo" : true
}

View File

@@ -0,0 +1,9 @@
{
"passes": [{
"shader": "effects/skew",
"blending": "normal",
"depthtest": "disabled",
"depthwrite": "disabled",
"cullmode": "nocull"
}]
}

View File

@@ -0,0 +1,4 @@
{
"autosize" : true,
"material" : "materials/effectpreview.json"
}

View 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"
}

View 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
}
]
}

View File

@@ -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);
}

View File

@@ -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
}

View File

@@ -0,0 +1,4 @@
{
"name": "FX Preview",
"type": "scene2d"
}

View File

@@ -0,0 +1,15 @@
// [COMBO] {"material":"ui_editor_properties_repeat","combo":"REPEAT","type":"options","default":1}
varying vec2 v_TexCoord;
uniform sampler2D g_Texture0; // {"hidden":true}
void main() {
vec2 texCoord = v_TexCoord.xy;
#if REPEAT
texCoord = frac(texCoord);
#endif
gl_FragColor = texSample2D(g_Texture0, texCoord);
}

View File

@@ -0,0 +1,42 @@
// [COMBO] {"material":"ui_editor_properties_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_TextureReductionScale;
uniform float g_Top; // {"material":"top","label":"ui_editor_properties_top","default":0.0,"range":[-2,2]}
uniform float g_Bottom; // {"material":"bottom","label":"ui_editor_properties_bottom","default":0.0,"range":[-2,2]}
uniform float g_Left; // {"material":"left","label":"ui_editor_properties_left","default":0.0,"range":[-2,2]}
uniform float g_Right; // {"material":"right","label":"ui_editor_properties_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 * g_TextureReductionScale;
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
}