yes
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name" : "ui_editor_effect_fire_title",
|
||||
"description" : "ui_editor_effect_fire_description",
|
||||
"group" : "colorize",
|
||||
//"preview" : "preview/project.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"material" : "materials/effects/fire.json"
|
||||
}
|
||||
],
|
||||
"dependencies" :
|
||||
[
|
||||
"materials/effects/fire.json",
|
||||
"shaders/effects/fire.frag",
|
||||
"shaders/effects/fire.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/fire",
|
||||
"blending": "normal",
|
||||
"depthtest": "disabled",
|
||||
"depthwrite": "disabled",
|
||||
"cullmode": "nocull"
|
||||
}]
|
||||
}
|
||||
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/fire/preview/project.json
Normal file
18
modules/wallpaper-engine/effects/fire/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"
|
||||
}
|
||||
76
modules/wallpaper-engine/effects/fire/preview/scene.json
Normal file
76
modules/wallpaper-engine/effects/fire/preview/scene.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"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",
|
||||
"clearenabled" : null,
|
||||
"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/fire/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"constantshadervalues" :
|
||||
{
|
||||
"ui_editor_properties_alpha" : 2.6700000762939453,
|
||||
"ui_editor_properties_color_end" : "1 0.8 0",
|
||||
"ui_editor_properties_color_start" : "1 0.25 0",
|
||||
"ui_editor_properties_feather" : 0.20000000298023224,
|
||||
"ui_editor_properties_scale" : 1.3400000333786011,
|
||||
"ui_editor_properties_smoothness" : 0.93000000715255737,
|
||||
"ui_editor_properties_threshold" : 0.0
|
||||
},
|
||||
"textures" :
|
||||
[
|
||||
null,
|
||||
"masks/fire_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8",
|
||||
"util/clouds_256"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"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,73 @@
|
||||
|
||||
// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":9}
|
||||
// [COMBO] {"material":"ui_editor_properties_refract","combo":"REFRACT","type":"options","default":1}
|
||||
|
||||
#include "common_blending.h"
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
varying vec2 v_Scroll;
|
||||
|
||||
uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true}
|
||||
uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_flow_map","mode":"flowmask","default":"util/noflow"}
|
||||
uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_albedo","default":"util/clouds_256"}
|
||||
uniform float g_Time;
|
||||
|
||||
uniform float g_FlowSpeed; // {"material":"ui_editor_properties_speed","default":1,"range":[0.01, 1]}
|
||||
uniform float g_FlowPhaseScale; // {"material":"ui_editor_properties_phase_scale","default":1,"range":[0.01, 10]}
|
||||
|
||||
uniform float g_CloudsAlpha; // {"material":"ui_editor_properties_alpha","default":2.0,"range":[0.01, 10]}
|
||||
uniform float g_CloudThreshold; // {"material":"ui_editor_properties_threshold","default":0,"range:":[0,1]}
|
||||
uniform float g_CloudFeather; // {"material":"ui_editor_properties_feather","default":0.2,"range":[0,1]}
|
||||
uniform float g_CloudLOD; // {"material":"ui_editor_properties_smoothness","default":0.0,"range":[0, 5]}
|
||||
uniform float g_CloudScale; // {"material":"ui_editor_properties_scale","default":2.0,"range":[0.01, 10]}
|
||||
|
||||
uniform vec3 g_Color1; // {"material":"ui_editor_properties_color_start","default":"1 0.25 0","type":"color"}
|
||||
uniform vec3 g_Color2; // {"material":"ui_editor_properties_color_end","default":"1 0.8 0","type":"color"}
|
||||
|
||||
void main() {
|
||||
|
||||
vec2 flowColors = texSample2D(g_Texture1, v_TexCoord.zw).rg;
|
||||
vec2 flowMask = (flowColors.rg - vec2(0.498, 0.498)) * 2.0;
|
||||
|
||||
float scaledTime = g_Time * g_FlowSpeed;
|
||||
vec2 cycles = vec2( frac(scaledTime),
|
||||
frac(scaledTime + 0.5));
|
||||
|
||||
float blend = 2 * abs(cycles.x - 0.5);
|
||||
|
||||
vec2 flowUVOffset1 = g_CloudScale * flowMask * 0.15 * (cycles.x - 0.5);
|
||||
vec2 flowUVOffset2 = g_CloudScale * flowMask * 0.15 * (cycles.y - 0.5);
|
||||
|
||||
float cloudBackground = texSample2DLod(g_Texture2, v_TexCoord.xy * g_CloudScale + scaledTime * 0.1, g_CloudLOD).r;
|
||||
|
||||
float cloud0 = texSample2DLod(g_Texture2, v_TexCoord.xy * g_CloudScale + flowUVOffset1, g_CloudLOD).r;
|
||||
float cloud1 = texSample2DLod(g_Texture2, v_TexCoord.xy * g_CloudScale + flowUVOffset2, g_CloudLOD).r;
|
||||
float streamNoise = mix(cloud0, cloud1, blend);
|
||||
|
||||
//streamNoise = cloudBackground * streamNoise;
|
||||
|
||||
|
||||
vec2 baseUV = v_TexCoord.xy;
|
||||
float flowMaskLength = pow(length(flowMask), 2.0);
|
||||
|
||||
#if REFRACT
|
||||
baseUV += mix(flowMask, -flowMask, streamNoise) * cloudBackground * 0.5 * streamNoise * flowMaskLength;
|
||||
#endif
|
||||
|
||||
vec4 albedo = texSample2D(g_Texture0, baseUV);
|
||||
|
||||
streamNoise = frac(streamNoise + scaledTime * 0.2);
|
||||
|
||||
float blendNoise = smoothstep(0, 0.5, streamNoise) * smoothstep(1.0, 0.5, streamNoise);
|
||||
vec3 cloudColor = mix(g_Color2, g_Color1, blendNoise);
|
||||
blendNoise = smoothstep(g_CloudThreshold, g_CloudThreshold + g_CloudFeather, blendNoise);
|
||||
|
||||
|
||||
|
||||
|
||||
float streamBlend = flowMaskLength * g_CloudsAlpha * (blendNoise);
|
||||
|
||||
albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, cloudColor, streamBlend);
|
||||
|
||||
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,4 @@
|
||||
{
|
||||
"name": "FX Preview",
|
||||
"type": "scene2d"
|
||||
}
|
||||
Reference in New Issue
Block a user