stuff
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name" : "ui_editor_effect_filmgrain_title",
|
||||
"description" : "ui_editor_effect_filmgrain_description",
|
||||
"group" : "colorize",
|
||||
//"preview" : "preview/project.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"material" : "materials/effects/filmgrain.json"
|
||||
}
|
||||
],
|
||||
"dependencies" :
|
||||
[
|
||||
"materials/effects/filmgrain.json",
|
||||
"shaders/effects/filmgrain.frag",
|
||||
"shaders/effects/filmgrain.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/filmgrain",
|
||||
"blending": "normal",
|
||||
"depthtest": "disabled",
|
||||
"depthwrite": "disabled",
|
||||
"cullmode": "nocull"
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"autosize" : true,
|
||||
"material" : "materials/effectpreview.json"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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/filmgrain/effect.json",
|
||||
"passes" :
|
||||
[
|
||||
{
|
||||
"combos" :
|
||||
{
|
||||
"GREYSCALE" : 1
|
||||
},
|
||||
"constantshadervalues" :
|
||||
{
|
||||
"ui_editor_properties_power" : 0.5,
|
||||
"ui_editor_properties_scale" : 4.8000001907348633,
|
||||
"ui_editor_properties_strength" : 5
|
||||
},
|
||||
"textures" : [ null, "util/noise" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"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,40 @@
|
||||
|
||||
// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":12}
|
||||
// [COMBO] {"material":"ui_editor_properties_greyscale","combo":"GREYSCALE","type":"options","default":1}
|
||||
|
||||
#include "common.h"
|
||||
#include "common_blending.h"
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
varying vec4 v_TexCoordNoise;
|
||||
|
||||
uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true}
|
||||
uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_noise","default":"util/noise"}
|
||||
uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK"}
|
||||
|
||||
uniform float g_NoiseAlpha; // {"material":"ui_editor_properties_strength","default":2,"range":[0.0, 5.0]}
|
||||
uniform float g_NoisePower; // {"material":"ui_editor_properties_power","default":0.5,"range":[0.0, 5.0]}
|
||||
|
||||
void main() {
|
||||
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
|
||||
|
||||
vec3 noise = texSample2D(g_Texture1, v_TexCoordNoise.xy).rgb;
|
||||
vec3 noise2 = texSample2D(g_Texture1, v_TexCoordNoise.zw).gbr;
|
||||
|
||||
#if GREYSCALE == 1
|
||||
noise = CAST3(greyscale(noise));
|
||||
noise2 = CAST3(greyscale(noise2));
|
||||
#endif
|
||||
|
||||
noise = saturate(noise * noise2);
|
||||
noise = pow(noise, g_NoisePower);
|
||||
|
||||
float blend = g_NoiseAlpha;
|
||||
#if MASK == 1
|
||||
blend *= texSample2D(g_Texture2, v_TexCoord.zw).r;
|
||||
#endif
|
||||
|
||||
albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, noise, blend);
|
||||
|
||||
gl_FragColor = albedo;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
uniform mat4 g_ModelViewProjectionMatrix;
|
||||
|
||||
uniform vec4 g_Texture0Resolution;
|
||||
|
||||
#if MASK == 1
|
||||
uniform vec4 g_Texture2Resolution;
|
||||
#endif
|
||||
|
||||
uniform float g_Time;
|
||||
|
||||
attribute vec3 a_Position;
|
||||
attribute vec2 a_TexCoord;
|
||||
|
||||
varying vec4 v_TexCoord;
|
||||
varying vec4 v_TexCoordNoise;
|
||||
|
||||
uniform float g_NoiseScale; // {"material":"ui_editor_properties_scale","default":10,"range":[0.0, 20.0]}
|
||||
|
||||
void main() {
|
||||
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
|
||||
|
||||
float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w;
|
||||
|
||||
v_TexCoord = a_TexCoord.xyxy;
|
||||
v_TexCoordNoise.xy = (a_TexCoord.xy + g_Time) * g_NoiseScale;
|
||||
v_TexCoordNoise.zw = (a_TexCoord.xy - g_Time * 2.5) * g_NoiseScale * 0.52;
|
||||
v_TexCoordNoise *= vec4(aspect, 1.0, aspect, 1.0);
|
||||
|
||||
#if MASK == 1
|
||||
v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x,
|
||||
a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "FX Preview",
|
||||
"type": "scene2d"
|
||||
}
|
||||
Reference in New Issue
Block a user