This commit is contained in:
2025-02-07 17:04:43 -06:00
parent 33fd7ddf72
commit 8eec81c7f4
2249 changed files with 75331 additions and 685 deletions

View File

@@ -0,0 +1,10 @@
{
"passes": [{
"shader": "genericparticle",
"depthtest": "disabled",
"depthwrite": "disabled",
"blending": "additive",
"cullmode": "nocull",
"textures": ["particle/halo"]
}]
}

View File

@@ -0,0 +1,13 @@
{
"passes" :
[
{
"blending" : "additive",
"cullmode" : "nocull",
"depthtest" : "disabled",
"depthwrite" : "disabled",
"shader" : "genericparticle",
"textures" : [ "particle/light/light_shafts_0" ]
}
]
}

View File

@@ -0,0 +1,10 @@
{
"passes": [{
"shader": "genericparticle",
"depthtest": "disabled",
"depthwrite": "disabled",
"blending": "additive",
"cullmode": "nocull",
"textures": ["particle/light/light_shafts_6"]
}]
}

View File

@@ -0,0 +1,13 @@
{
"passes" :
[
{
"blending" : "additive",
"cullmode" : "nocull",
"depthtest" : "disabled",
"depthwrite" : "disabled",
"shader" : "genericparticle",
"textures" : [ "particle/light/light_shafts_1" ]
}
]
}

View File

@@ -0,0 +1,132 @@
{
"animationmode" : null,
"children" : null,
"controlpoint" :
[
{
"flags" : 0,
"id" : 0,
"offset" : "0 0 0"
},
{
"flags" : 1,
"id" : 1,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 2,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 3,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 4,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 5,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 6,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 7,
"offset" : "0 0 0"
}
],
"emitter" :
[
{
"distancemax" : "1024 512 0",
"id" : 6,
"name" : "boxrandom"
}
],
"flags" : null,
"initializer" :
[
{
"id" : 2,
"max" : 10,
"min" : 3,
"name" : "lifetimerandom"
},
{
"id" : 3,
"max" : 10,
"min" : 5,
"name" : "sizerandom"
},
{
"id" : 4,
"max" : "10 10 0",
"min" : "-10 -10 0",
"name" : "velocityrandom"
},
{
"id" : 5,
"max" : "255 242 176",
"min" : "251 255 180",
"name" : "colorrandom"
}
],
"material" : "materials/presets/dust_motes_0.json",
"maxcount" : 128,
"operator" :
[
{
"drag" : 1,
"gravity" : "0 0 0",
"id" : 7,
"name" : "movement"
},
{
"fadeintime" : 0.29999999999999999,
"fadeouttime" : 0.69999999999999996,
"id" : 8,
"name" : "alphafade"
},
{
"frequencymax" : 1,
"frequencymin" : 0.5,
"id" : 9,
"name" : "oscillateposition",
"scalemax" : 10
},
{
"frequencymax" : 7,
"frequencymin" : 3,
"id" : 10,
"name" : "oscillatealpha",
"scalemax" : 0.80000000000000004,
"scalemin" : 0.5
},
{
"controlpoint" : 1,
"id" : 11,
"name" : "controlpointattract",
"origin" : "0 0 0",
"scale" : -1024,
"threshold" : 32
}
],
"renderer" :
[
{
"id" : 1,
"name" : "sprite"
}
],
"sequencemultiplier" : null,
"starttime" : 1
}

View File

@@ -0,0 +1,128 @@
{
"animationmode" : null,
"children" : null,
"controlpoint" :
[
{
"flags" : 0,
"id" : 0,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 1,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 2,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 3,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 4,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 5,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 6,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 7,
"offset" : "0 0 0"
}
],
"emitter" :
[
{
"directions" : "1 1 0",
"distancemax" : 0,
"distancemin" : 0,
"id" : 8,
"name" : "sphererandom",
"origin" : "-70 0 0",
"rate" : 0.20000000000000001
}
],
"flags" : null,
"initializer" :
[
{
"id" : 2,
"max" : 20,
"min" : 8,
"name" : "lifetimerandom"
},
{
"id" : 3,
"max" : 1000,
"min" : 850,
"name" : "sizerandom"
},
{
"id" : 4,
"max" : "20 10 0",
"min" : "20 10 0",
"name" : "velocityrandom"
},
{
"id" : 5,
"max" : "170 110 40",
"min" : "110 92 20",
"name" : "colorrandom"
},
{
"id" : 6,
"max" : "0 0 0",
"min" : "0 0 0",
"name" : "rotationrandom"
},
{
"id" : 7,
"max" : "0 0 -0.05",
"min" : "0 0 -0.05",
"name" : "angularvelocityrandom"
}
],
"material" : "materials/presets/light_shafts_0.json",
"maxcount" : 16,
"operator" :
[
{
"gravity" : "0 0 0",
"id" : 9,
"name" : "movement"
},
{
"fadeintime" : 0.10000000000000001,
"id" : 10,
"name" : "alphafade"
},
{
"force" : "0 0 0",
"id" : 11,
"name" : "angularmovement"
}
],
"renderer" :
[
{
"id" : 1,
"name" : "sprite"
}
],
"sequencemultiplier" : null,
"starttime" : 10
}

View File

@@ -0,0 +1,41 @@
{
"material": "materials/presets/light_shafts_1.json",
"maxcount": 16,
"starttime": 15,
"emitter": [{
"name": "sphererandom",
"rate": 0.3,
"origin": "0 0 0",
"directions" : "1 0.03 0",
"distancemin": 10,
"distancemax": 320
}],
"initializer": [{
"name": "lifetimerandom",
"min": 8,
"max": 20
}, {
"name": "sizerandom",
"min": 350,
"max": 750
}, {
"name": "velocityrandom",
"min": "-20 0 0",
"max": "-5 10 0"
}, {
"name": "colorrandom",
"min": "110 92 20",
"max": "170 110 40"
}, {
"name": "rotationrandom",
"min": -0.4,
"max": -0.3
}],
"operator": [{
"name": "movement",
"gravity": "0 0 0"
}, {
"name": "alphafade",
"fadeintime": 0.1
}]
}

View File

@@ -0,0 +1,128 @@
{
"animationmode" : null,
"children" : null,
"controlpoint" :
[
{
"flags" : 0,
"id" : 0,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 1,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 2,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 3,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 4,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 5,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 6,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 7,
"offset" : "0 0 0"
}
],
"emitter" :
[
{
"directions" : "1 1 0",
"distancemax" : 0,
"distancemin" : 0,
"id" : 8,
"name" : "sphererandom",
"origin" : "-70 0 0",
"rate" : 0.20000000000000001
}
],
"flags" : null,
"initializer" :
[
{
"id" : 2,
"max" : 20,
"min" : 8,
"name" : "lifetimerandom"
},
{
"id" : 3,
"max" : 1000,
"min" : 850,
"name" : "sizerandom"
},
{
"id" : 4,
"max" : "20 10 0",
"min" : "20 10 0",
"name" : "velocityrandom"
},
{
"id" : 5,
"max" : "170 110 40",
"min" : "110 92 20",
"name" : "colorrandom"
},
{
"id" : 6,
"max" : "0 0 0",
"min" : "0 0 0",
"name" : "rotationrandom"
},
{
"id" : 7,
"max" : "0 0 -0.05",
"min" : "0 0 -0.05",
"name" : "angularvelocityrandom"
}
],
"material" : "materials/presets/light_shafts_2.json",
"maxcount" : 16,
"operator" :
[
{
"gravity" : "0 0 0",
"id" : 9,
"name" : "movement"
},
{
"fadeintime" : 0.10000000000000001,
"id" : 10,
"name" : "alphafade"
},
{
"force" : "0 0 0",
"id" : 11,
"name" : "angularmovement"
}
],
"renderer" :
[
{
"id" : 1,
"name" : "sprite"
}
],
"sequencemultiplier" : null,
"starttime" : 10
}

View File

@@ -0,0 +1,276 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "ui_editor_preset_light_shafts_variant_corner",
"value" : 0
},
{
"label" : "ui_editor_preset_light_shafts_variant_radial",
"value" : 1
},
{
"label" : "ui_editor_preset_light_shafts_variant_linear",
"value" : 2
},
{
"label" : "ui_editor_preset_light_shafts_variant_dust_motes",
"value" : 3
},
{
"label" : "ui_editor_preset_light_shafts_variant_1",
"value" : 4
},
{
"label" : "ui_editor_preset_light_shafts_variant_2",
"value" : 5
},
{
"label" : "ui_editor_preset_light_shafts_variant_3",
"value" : 6
}
]
},
"variants" :
[
{
"preview" : "previewlscorner/project.json",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYCORNER" : 1,
"RAYMODE" : 2,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1,
"colorwintensity" : 1,
"noiseamount" : 0.33000001,
"noisescale" : 0.85,
"point1" : "0.85704 0.06238",
"point2" : "0.94690 0.66185",
"point3" : "0.07415 0.95000",
"point0" : "0.24560 0.09457",
"rayfeather" : "0.22 0.1",
"rayradius" : 0.15,
"rayscale" : "0.4 1.01",
"raysmoothness" : 0.54,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - corner",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "previewlsradial/project.json",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 1,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1.12,
"colorwintensity" : 1,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.75 0.25",
"point1" : "0.75 0.75",
"point2" : "0.25 0.75",
"point3" : "0.25 0.25",
"rayfeather" : "0.01 0.07",
"rayradius" : 0.14,
"rayscale" : "0.66 1.01",
"raysmoothness" : 0.6,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - radial",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "previewlslinear/project.json",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 0,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 0.9,
"colorwintensity" : 1,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.4 0.25",
"point1" : "0.6 0.25",
"point2" : "0.8 0.8",
"point3" : "0.2 0.8",
"rayfeather" : "0.16 0.13",
"rayradius" : 0.14,
"rayscale" : "0.8 0.2",
"raysmoothness" : 0.5,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - linear",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "previewdustmotes0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Dust motes",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/dust_motes_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/dust_motes_0.json",
"particles/presets/dust_motes_0.json"
]
},
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
}
]
}

View File

@@ -0,0 +1,10 @@
{
"passes": [{
"shader": "genericparticle",
"depthtest": "disabled",
"depthwrite": "disabled",
"blending": "additive",
"cullmode": "nocull",
"textures": ["particle/halo"]
}]
}

View File

@@ -0,0 +1,132 @@
{
"animationmode" : null,
"children" : null,
"controlpoint" :
[
{
"flags" : 0,
"id" : 0,
"offset" : "0 0 0"
},
{
"flags" : 1,
"id" : 1,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 2,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 3,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 4,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 5,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 6,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 7,
"offset" : "0 0 0"
}
],
"emitter" :
[
{
"distancemax" : "512 256 0",
"id" : 6,
"name" : "boxrandom"
}
],
"flags" : null,
"initializer" :
[
{
"id" : 2,
"max" : 10,
"min" : 3,
"name" : "lifetimerandom"
},
{
"id" : 3,
"max" : 10,
"min" : 5,
"name" : "sizerandom"
},
{
"id" : 4,
"max" : "10 10 0",
"min" : "-10 -10 0",
"name" : "velocityrandom"
},
{
"id" : 5,
"max" : "255 242 176",
"min" : "251 255 180",
"name" : "colorrandom"
}
],
"material" : "materials/presets/dust_motes_0.json",
"maxcount" : 128,
"operator" :
[
{
"drag" : 1,
"gravity" : "0 0 0",
"id" : 7,
"name" : "movement"
},
{
"fadeintime" : 0.29999999999999999,
"fadeouttime" : 0.69999999999999996,
"id" : 8,
"name" : "alphafade"
},
{
"frequencymax" : 1,
"frequencymin" : 0.5,
"id" : 9,
"name" : "oscillateposition",
"scalemax" : 10
},
{
"frequencymax" : 7,
"frequencymin" : 3,
"id" : 10,
"name" : "oscillatealpha",
"scalemax" : 0.80000000000000004,
"scalemin" : 0.5
},
{
"controlpoint" : 1,
"id" : 11,
"name" : "controlpointattract",
"origin" : "0 0 0",
"scale" : -1024,
"threshold" : 32
}
],
"renderer" :
[
{
"id" : 1,
"name" : "sprite"
}
],
"sequencemultiplier" : null,
"starttime" : 1
}

View File

@@ -0,0 +1,104 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "Light shafts 0",
"value" : 0
},
{
"label" : "Light shafts 1",
"value" : 1
},
{
"label" : "Light shafts 2",
"value" : 2
},
{
"label" : "Dust motes",
"value" : 3
}
]
},
"variants" :
[
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
},
{
"preview" : "previewdustmotes0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Dust motes",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/dust_motes_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/dust_motes_0.json",
"particles/presets/dust_motes_0.json"
]
}
]
}

View File

@@ -0,0 +1,17 @@
{
"file" : "scene.json",
"general" :
{
"properties" :
{
"schemecolor" :
{
"order" : 0,
"text" : "ui_browse_properties_scheme_color",
"type" : "color",
"value" : "0 0 0"
}
}
},
"title" : "previewdustmotes"
}

View File

@@ -0,0 +1,50 @@
{
"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.4 0.4 0.4",
"clearenabled" : null,
"orthogonalprojection" :
{
"height" : 256,
"width" : 256
},
"skylightcolor" : "0.3 0.3 0.3"
},
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"id" : 12,
"image" : null,
"instanceoverride" :
{
"count" : 2
},
"model" : null,
"name" : "Dust motes",
"origin" : "128.000 128.000 0.000",
"parallaxDepth" : "1.000 1.000",
"particle" : "particles/presets/dust_motes_0.json",
"scale" : "1.000 1.000 1.000"
}
]
}

View File

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

View File

@@ -0,0 +1,13 @@
{
"passes" :
[
{
"blending" : "additive",
"cullmode" : "nocull",
"depthtest" : "disabled",
"depthwrite" : "disabled",
"shader" : "genericparticle",
"textures" : [ "particle/light/light_shafts_0" ]
}
]
}

View File

@@ -0,0 +1,128 @@
{
"animationmode" : null,
"children" : null,
"controlpoint" :
[
{
"flags" : 0,
"id" : 0,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 1,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 2,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 3,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 4,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 5,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 6,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 7,
"offset" : "0 0 0"
}
],
"emitter" :
[
{
"directions" : "1 1 0",
"distancemax" : 0,
"distancemin" : 0,
"id" : 8,
"name" : "sphererandom",
"origin" : "-70 0 0",
"rate" : 0.20000000000000001
}
],
"flags" : null,
"initializer" :
[
{
"id" : 2,
"max" : 20,
"min" : 8,
"name" : "lifetimerandom"
},
{
"id" : 3,
"max" : 1000,
"min" : 850,
"name" : "sizerandom"
},
{
"id" : 4,
"max" : "20 0 0",
"min" : "20 0 0",
"name" : "velocityrandom"
},
{
"id" : 5,
"max" : "170 110 40",
"min" : "110 92 20",
"name" : "colorrandom"
},
{
"id" : 6,
"max" : "0 0 0",
"min" : "0 0 0",
"name" : "rotationrandom"
},
{
"id" : 7,
"max" : "0 0 -0.05",
"min" : "0 0 -0.05",
"name" : "angularvelocityrandom"
}
],
"material" : "materials/presets/light_shafts_0.json",
"maxcount" : 16,
"operator" :
[
{
"gravity" : "0 0 0",
"id" : 9,
"name" : "movement"
},
{
"fadeintime" : 0.10000000000000001,
"id" : 10,
"name" : "alphafade"
},
{
"force" : "0 0 0",
"id" : 11,
"name" : "angularmovement"
}
],
"renderer" :
[
{
"id" : 1,
"name" : "sprite"
}
],
"sequencemultiplier" : null,
"starttime" : 10
}

View File

@@ -0,0 +1,82 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "Light shafts 0",
"value" : 0
},
{
"label" : "Light shafts 1",
"value" : 1
},
{
"label" : "Light shafts 2",
"value" : 2
}
]
},
"variants" :
[
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
}
]
}

View File

@@ -0,0 +1,17 @@
{
"file" : "scene.json",
"general" :
{
"properties" :
{
"schemecolor" :
{
"order" : 0,
"text" : "ui_browse_properties_scheme_color",
"type" : "color",
"value" : "0 0 0"
}
}
},
"title" : "previewlightshafts0"
}

View File

@@ -0,0 +1,47 @@
{
"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",
"id" : 12,
"image" : null,
"instanceoverride" : null,
"model" : null,
"name" : "Light shafts 0",
"origin" : "64.004 144.175 0.000",
"parallaxDepth" : "1.000 1.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "0.406 0.406 1.000"
}
]
}

View File

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

View File

@@ -0,0 +1,10 @@
{
"passes": [{
"shader": "genericparticle",
"depthtest": "disabled",
"depthwrite": "disabled",
"blending": "additive",
"cullmode": "nocull",
"textures": ["particle/light/light_shafts_6"]
}]
}

View File

@@ -0,0 +1,41 @@
{
"material": "materials/presets/light_shafts_1.json",
"maxcount": 15,
"starttime": 15,
"emitter": [{
"name": "sphererandom",
"rate": 0.3,
"origin": "0 0 0",
"directions" : "1 0.03 0",
"distancemin": 10,
"distancemax": 320
}],
"initializer": [{
"name": "lifetimerandom",
"min": 8,
"max": 20
}, {
"name": "sizerandom",
"min": 350,
"max": 750
}, {
"name": "velocityrandom",
"min": "-20 0 0",
"max": "-5 10 0"
}, {
"name": "colorrandom",
"min": "110 92 20",
"max": "170 110 40"
}, {
"name": "rotationrandom",
"min": -0.4,
"max": -0.3
}],
"operator": [{
"name": "movement",
"gravity": "0 0 0"
}, {
"name": "alphafade",
"fadeintime": 0.1
}]
}

View File

@@ -0,0 +1,82 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "Light shafts 0",
"value" : 0
},
{
"label" : "Light shafts 1",
"value" : 1
},
{
"label" : "Light shafts 2",
"value" : 2
}
]
},
"variants" :
[
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
}
]
}

View File

@@ -0,0 +1,17 @@
{
"file" : "scene.json",
"general" :
{
"properties" :
{
"schemecolor" :
{
"order" : 0,
"text" : "ui_browse_properties_scheme_color",
"type" : "color",
"value" : "0 0 0"
}
}
},
"title" : "previewlightshafts1"
}

View File

@@ -0,0 +1,47 @@
{
"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",
"id" : 12,
"image" : null,
"instanceoverride" : null,
"model" : null,
"name" : "Light shafts 1",
"origin" : "146.233 132.341 0.000",
"parallaxDepth" : "1.000 1.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "0.434 0.434 1.000"
}
]
}

View File

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

View File

@@ -0,0 +1,13 @@
{
"passes" :
[
{
"blending" : "additive",
"cullmode" : "nocull",
"depthtest" : "disabled",
"depthwrite" : "disabled",
"shader" : "genericparticle",
"textures" : [ "particle/light/light_shafts_1" ]
}
]
}

View File

@@ -0,0 +1,128 @@
{
"animationmode" : null,
"children" : null,
"controlpoint" :
[
{
"flags" : 0,
"id" : 0,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 1,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 2,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 3,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 4,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 5,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 6,
"offset" : "0 0 0"
},
{
"flags" : 0,
"id" : 7,
"offset" : "0 0 0"
}
],
"emitter" :
[
{
"directions" : "1 1 0",
"distancemax" : 0,
"distancemin" : 0,
"id" : 8,
"name" : "sphererandom",
"origin" : "-70 0 0",
"rate" : 0.20000000000000001
}
],
"flags" : null,
"initializer" :
[
{
"id" : 2,
"max" : 20,
"min" : 8,
"name" : "lifetimerandom"
},
{
"id" : 3,
"max" : 1000,
"min" : 850,
"name" : "sizerandom"
},
{
"id" : 4,
"max" : "20 10 0",
"min" : "20 10 0",
"name" : "velocityrandom"
},
{
"id" : 5,
"max" : "170 110 40",
"min" : "110 92 20",
"name" : "colorrandom"
},
{
"id" : 6,
"max" : "0 0 0",
"min" : "0 0 0",
"name" : "rotationrandom"
},
{
"id" : 7,
"max" : "0 0 -0.05",
"min" : "0 0 -0.05",
"name" : "angularvelocityrandom"
}
],
"material" : "materials/presets/light_shafts_2.json",
"maxcount" : 16,
"operator" :
[
{
"gravity" : "0 0 0",
"id" : 9,
"name" : "movement"
},
{
"fadeintime" : 0.10000000000000001,
"id" : 10,
"name" : "alphafade"
},
{
"force" : "0 0 0",
"id" : 11,
"name" : "angularmovement"
}
],
"renderer" :
[
{
"id" : 1,
"name" : "sprite"
}
],
"sequencemultiplier" : null,
"starttime" : 10
}

View File

@@ -0,0 +1,82 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "Light shafts 0",
"value" : 0
},
{
"label" : "Light shafts 1",
"value" : 1
},
{
"label" : "Light shafts 2",
"value" : 2
}
]
},
"variants" :
[
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
}
]
}

View File

@@ -0,0 +1,17 @@
{
"file" : "scene.json",
"general" :
{
"properties" :
{
"schemecolor" :
{
"order" : 0,
"text" : "ui_browse_properties_scheme_color",
"type" : "color",
"value" : "0 0 0"
}
}
},
"title" : "previewlightshafts2"
}

View File

@@ -0,0 +1,47 @@
{
"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",
"id" : 12,
"image" : null,
"instanceoverride" : null,
"model" : null,
"name" : "Light shafts 2",
"origin" : "104.706 66.769 0.000",
"parallaxDepth" : "1.000 1.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "0.533 0.533 1.000"
}
]
}

View File

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

View File

@@ -0,0 +1,33 @@
{
"version" : 1,
"replacementkey" : "lightshafts",
"name" : "ui_editor_effect_light_shafts_title",
"description" : "ui_editor_effect_light_shafts_description",
"group" : "colorize",
"preview" : "preview/project.json",
"passes" :
[
{
"material" : "materials/effects/lightshafts.json"
}
],
"dependencies" :
[
"materials/effects/lightshafts.json",
"shaders/effects/lightshafts.frag",
"shaders/effects/lightshafts.vert"
],
"gizmos" :
[
{
"type" : "EffectPerspectiveUV",
"vars" :
{
"p0" : "point0",
"p1" : "point1",
"p2" : "point2",
"p3" : "point3"
}
}
]
}

View File

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

View File

@@ -0,0 +1,275 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "ui_editor_preset_light_shafts_variant_corner",
"value" : 0
},
{
"label" : "ui_editor_preset_light_shafts_variant_radial",
"value" : 1
},
{
"label" : "ui_editor_preset_light_shafts_variant_directional",
"value" : 2
},
{
"label" : "ui_editor_preset_light_shafts_variant_dust_motes",
"value" : 3
},
{
"label" : "ui_editor_preset_light_shafts_variant_1",
"value" : 4
},
{
"label" : "ui_editor_preset_light_shafts_variant_2",
"value" : 5
},
{
"label" : "ui_editor_preset_light_shafts_variant_3",
"value" : 6
}
]
},
"variants" :
[
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 2,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 0.85,
"point0" : "0.85704 0.06238",
"point1" : "0.94690 0.66185",
"point2" : "0.07415 0.95000",
"point3" : "0.24560 0.09457",
"rayfeather" : "0.22 0.1",
"rayradius" : 0.15,
"rayscale" : "0.4 1.01",
"raysmoothness" : 0.54,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - corner",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 1,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1.12,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.75 0.25",
"point1" : "0.75 0.75",
"point2" : "0.25 0.75",
"point3" : "0.25 0.25",
"rayfeather" : "0.01 0.07",
"rayradius" : 0.14,
"rayscale" : "0.66 1.01",
"raysmoothness" : 0.6,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - radial",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 0,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 0.9,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.4 0.25",
"point1" : "0.6 0.25",
"point2" : "0.8 0.8",
"point3" : "0.2 0.8",
"rayfeather" : "0.16 0.13",
"rayradius" : 0.14,
"rayscale" : "0.8 0.2",
"raysmoothness" : 0.5,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - linear",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "previewdustmotes0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Dust motes",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/dust_motes_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/dust_motes_0.json",
"particles/presets/dust_motes_0.json"
]
},
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"file" : "scene.json",
"general" :
{
"properties" :
{
"schemecolor" :
{
"order" : 0,
"text" : "ui_browse_properties_scheme_color",
"type" : "color",
"value" : "0 0 0"
}
}
},
"title" : "previewlightshafteffectcorner",
"type" : "scene",
"version" : 0
}

View File

@@ -0,0 +1,96 @@
{
"camera" :
{
"center" : "0.00000 0.00000 -1.00000",
"eye" : "0.00000 0.00000 0.00000",
"up" : "0.00000 1.00000 0.00000"
},
"general" :
{
"ambientcolor" : "0.30000 0.30000 0.30000",
"bloom" : false,
"bloomhdrfeather" : 0.1,
"bloomhdriterations" : 8,
"bloomhdrscatter" : 1.619,
"bloomhdrstrength" : 2.0,
"bloomhdrthreshold" : 1.0,
"bloomstrength" : 2.0,
"bloomthreshold" : 0.64999998,
"bloomtint" : "1.00000 1.00000 1.00000",
"camerafade" : true,
"cameraparallax" : false,
"cameraparallaxamount" : 0.5,
"cameraparallaxdelay" : 0.1,
"cameraparallaxmouseinfluence" : 0.0,
"camerapreview" : true,
"camerashake" : false,
"camerashakeamplitude" : 0.5,
"camerashakeroughness" : 1.0,
"camerashakespeed" : 3.0,
"clearcolor" : "0.38824 0.38824 0.38824",
"clearenabled" : true,
"farz" : 10000.0,
"fov" : 50.0,
"hdr" : false,
"nearz" : 0.0099999998,
"orthogonalprojection" :
{
"height" : 256,
"width" : 256
},
"perspectiveoverridefov" : 95.0,
"skylightcolor" : "0.30000 0.30000 0.30000",
"zoom" : 1.0
},
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"id" : 14,
"name" : "",
"passes" :
[
{
"combos" :
{
"DIRECTDRAW" : 1,
"RAYMODE" : 2,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 0.85,
"point0" : "0.85704 0.06238",
"point1" : "0.94690 0.66185",
"point2" : "0.07415 0.95000",
"point3" : "0.24560 0.09457",
"rayfeather" : "0.22 0.1",
"rayradius" : 0.15,
"rayscale" : "0.4 1.01",
"raysmoothness" : 0.54,
"rayspeed" : 0.38999999
},
"id" : 15
}
],
"visible" : true
}
],
"id" : 13,
"name" : "Light shafts - corner",
"origin" : "135.21112 117.58400 0.00000",
"scale" : "1.20791 1.20791 1.20791",
"shape" : "quad"
}
],
"version" : 0
}

View File

@@ -0,0 +1,124 @@
// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31,"require":{"DIRECTDRAW":0}}
// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0,"require":{"DIRECTDRAW":0}}
// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_directional":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}}
// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}}
#include "common_fragment.h"
#include "common_blending.h"
varying vec4 v_TexCoord;
varying vec3 v_TexCoordFx;
uniform sampler2D g_Texture0; // {"hidden":true}
uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"}
uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}}
uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"DIRECTDRAW":0}}
uniform float g_Time;
uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0],"group":"ui_editor_properties_shape"}
uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0],"group":"ui_editor_properties_shape","group":"ui_editor_properties_shape"}
uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0],"group":"ui_editor_properties_blending"}
uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5],"group":"ui_editor_properties_blending"}
uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.2,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"}
uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0],"group":"ui_editor_properties_shape"}
uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"}
uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0],"group":"ui_editor_properties_blending"}
uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":1,"range":[0.2, 2.0],"group":"ui_editor_properties_blending"}
uniform vec3 g_ColorRaysStart; // {"material":"colorastart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color","group":"ui_editor_properties_blending"}
uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color","group":"ui_editor_properties_blending"}
void main() {
vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z;
#if DIRECTDRAW
vec4 albedo = CAST4(0.0);
#else
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
#endif
float mask = step(0.0, v_TexCoordFx.z);
vec2 shapeScale = g_Scale;
#if RAYMODE == 1
vec2 rayCenter = vec2(0.5, 0.5);
vec2 rayDelta = fxCoord - rayCenter;
fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5;
fxCoord.y = length(rayDelta) * 2.0;
//fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y);
fxCoord.y = (fxCoord.y - 0.0001) * 1.00021;
vec2 fxCoordRef = fxCoord;
shapeScale.x *= 4;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#elif RAYMODE == 2
vec2 rayCenter = vec2(0, 0);
vec2 rayDelta = fxCoord - rayCenter;
fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4;
fxCoord.y = max(rayDelta.x, rayDelta.y);
//fxCoord.y = length(rayDelta);
fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y);
vec2 fxCoordRef = fxCoord;
shapeScale.x *= 4;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#else
//fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
vec2 fxCoordRef = fxCoord;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#endif
float grad = 1.0 - fxCoord.y;
mask *= grad;
vec2 fxCoord2 = fxCoord;
fxCoord.xy *= vec2(0.054111 * shapeScale.x, 0.003111 * shapeScale.y);
fxCoord2.xy *= vec2(0.07333 * shapeScale.x, 0.005967111 * shapeScale.y);
fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111);
fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399);
float fx0 = texSample2D(g_Texture1, fxCoord).r;
float fx1 = texSample2D(g_Texture1, fxCoord2).r;
float fx = fx0 * fx1;
fx = pow(fx, g_Exponent);
fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx);
#if RENDERING == 0
vec3 fxColor = mix(g_ColorRaysStart, g_ColorRaysEnd, fxCoordRef.y) * g_Intensity;
#else
vec2 gradientUVs = vec2(fxCoordRef.y, 0);
#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88
vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr;
#else
vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb;
#endif
vec3 fxColor = gradColor * g_Intensity;
#endif
#if MASK
float maskSample = texSample2D(g_Texture3, v_TexCoord.zw).r;
//albedo = mix(sample, albedo, mask);
mask *= maskSample;
#endif
fx *= mask;
albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor, fx);
albedo.a = max(albedo.a, fx);
#if WRITEALPHA
albedo.a = fx;
#endif
gl_FragColor = albedo;
}

View File

@@ -0,0 +1,34 @@
#include "common.h"
#include "common_perspective.h"
uniform mat4 g_ModelViewProjectionMatrix;
#if MASK
uniform vec4 g_Texture3Resolution;
#endif
uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881","require":{"DIRECTDRAW":0}}
attribute vec3 a_Position;
attribute vec2 a_TexCoord;
varying vec4 v_TexCoord;
varying vec3 v_TexCoordFx;
void main() {
mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3));
v_TexCoord = a_TexCoord.xyxy;
v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform);
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
#if MASK
v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x,
a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y);
#endif
}

View File

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

View File

@@ -0,0 +1,33 @@
{
"version" : 1,
"replacementkey" : "lightshafts",
"name" : "ui_editor_effect_light_shafts_title",
"description" : "ui_editor_effect_light_shafts_description",
"group" : "colorize",
"preview" : "preview/project.json",
"passes" :
[
{
"material" : "materials/effects/lightshafts.json"
}
],
"dependencies" :
[
"materials/effects/lightshafts.json",
"shaders/effects/lightshafts.frag",
"shaders/effects/lightshafts.vert"
],
"gizmos" :
[
{
"type" : "EffectPerspectiveUV",
"vars" :
{
"p0" : "point0",
"p1" : "point1",
"p2" : "point2",
"p3" : "point3"
}
}
]
}

View File

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

View File

@@ -0,0 +1,275 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "ui_editor_preset_light_shafts_variant_corner",
"value" : 0
},
{
"label" : "ui_editor_preset_light_shafts_variant_radial",
"value" : 1
},
{
"label" : "ui_editor_preset_light_shafts_variant_directional",
"value" : 2
},
{
"label" : "ui_editor_preset_light_shafts_variant_dust_motes",
"value" : 3
},
{
"label" : "ui_editor_preset_light_shafts_variant_1",
"value" : 4
},
{
"label" : "ui_editor_preset_light_shafts_variant_2",
"value" : 5
},
{
"label" : "ui_editor_preset_light_shafts_variant_3",
"value" : 6
}
]
},
"variants" :
[
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 2,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 0.85,
"point0" : "0.85704 0.06238",
"point1" : "0.94690 0.66185",
"point2" : "0.07415 0.95000",
"point3" : "0.24560 0.09457",
"rayfeather" : "0.22 0.1",
"rayradius" : 0.15,
"rayscale" : "0.4 1.01",
"raysmoothness" : 0.54,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - corner",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 1,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1.12,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.75 0.25",
"point1" : "0.75 0.75",
"point2" : "0.25 0.75",
"point3" : "0.25 0.25",
"rayfeather" : "0.01 0.07",
"rayradius" : 0.14,
"rayscale" : "0.66 1.01",
"raysmoothness" : 0.6,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - radial",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 0,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 0.9,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.4 0.25",
"point1" : "0.6 0.25",
"point2" : "0.8 0.8",
"point3" : "0.2 0.8",
"rayfeather" : "0.16 0.13",
"rayradius" : 0.14,
"rayscale" : "0.8 0.2",
"raysmoothness" : 0.5,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - linear",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "previewdustmotes0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Dust motes",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/dust_motes_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/dust_motes_0.json",
"particles/presets/dust_motes_0.json"
]
},
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"file" : "scene.json",
"general" :
{
"properties" :
{
"schemecolor" :
{
"order" : 0,
"text" : "ui_browse_properties_scheme_color",
"type" : "color",
"value" : "0 0 0"
}
}
},
"title" : "previewlightshafteffectcorner",
"type" : "scene",
"version" : 0
}

View File

@@ -0,0 +1,95 @@
{
"camera" :
{
"center" : "0.00000 0.00000 -1.00000",
"eye" : "0.00000 0.00000 0.00000",
"up" : "0.00000 1.00000 0.00000"
},
"general" :
{
"ambientcolor" : "0.30000 0.30000 0.30000",
"bloom" : false,
"bloomhdrfeather" : 0.1,
"bloomhdriterations" : 8,
"bloomhdrscatter" : 1.619,
"bloomhdrstrength" : 2.0,
"bloomhdrthreshold" : 1.0,
"bloomstrength" : 2.0,
"bloomthreshold" : 0.64999998,
"bloomtint" : "1.00000 1.00000 1.00000",
"camerafade" : true,
"cameraparallax" : false,
"cameraparallaxamount" : 0.5,
"cameraparallaxdelay" : 0.1,
"cameraparallaxmouseinfluence" : 0.0,
"camerapreview" : true,
"camerashake" : false,
"camerashakeamplitude" : 0.5,
"camerashakeroughness" : 1.0,
"camerashakespeed" : 3.0,
"clearcolor" : "0.38824 0.38824 0.38824",
"clearenabled" : true,
"farz" : 10000.0,
"fov" : 50.0,
"hdr" : false,
"nearz" : 0.0099999998,
"orthogonalprojection" :
{
"height" : 256,
"width" : 256
},
"perspectiveoverridefov" : 95.0,
"skylightcolor" : "0.30000 0.30000 0.30000",
"zoom" : 1.0
},
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"id" : 24,
"name" : "",
"passes" :
[
{
"combos" :
{
"DIRECTDRAW" : 1,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 0.9,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.4 0.25",
"point1" : "0.6 0.25",
"point2" : "0.8 0.8",
"point3" : "0.2 0.8",
"rayfeather" : "0.16 0.13",
"rayradius" : 0.14,
"rayscale" : "0.8 0.2",
"raysmoothness" : 0.5,
"rayspeed" : 0.38999999
},
"id" : 25
}
],
"visible" : true
}
],
"id" : 23,
"name" : "Light shafts - linear",
"origin" : "126.79814 126.79816 0.00000",
"scale" : "2.03800 2.03800 2.03800",
"shape" : "quad"
}
],
"version" : 0
}

View File

@@ -0,0 +1,124 @@
// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31,"require":{"DIRECTDRAW":0}}
// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0,"require":{"DIRECTDRAW":0}}
// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_directional":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}}
// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}}
#include "common_fragment.h"
#include "common_blending.h"
varying vec4 v_TexCoord;
varying vec3 v_TexCoordFx;
uniform sampler2D g_Texture0; // {"hidden":true}
uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"}
uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}}
uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"DIRECTDRAW":0}}
uniform float g_Time;
uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0],"group":"ui_editor_properties_shape"}
uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0],"group":"ui_editor_properties_shape","group":"ui_editor_properties_shape"}
uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0],"group":"ui_editor_properties_blending"}
uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5],"group":"ui_editor_properties_blending"}
uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.2,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"}
uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0],"group":"ui_editor_properties_shape"}
uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"}
uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0],"group":"ui_editor_properties_blending"}
uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":1,"range":[0.2, 2.0],"group":"ui_editor_properties_blending"}
uniform vec3 g_ColorRaysStart; // {"material":"colorastart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color","group":"ui_editor_properties_blending"}
uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color","group":"ui_editor_properties_blending"}
void main() {
vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z;
#if DIRECTDRAW
vec4 albedo = CAST4(0.0);
#else
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
#endif
float mask = step(0.0, v_TexCoordFx.z);
vec2 shapeScale = g_Scale;
#if RAYMODE == 1
vec2 rayCenter = vec2(0.5, 0.5);
vec2 rayDelta = fxCoord - rayCenter;
fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5;
fxCoord.y = length(rayDelta) * 2.0;
//fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y);
fxCoord.y = (fxCoord.y - 0.0001) * 1.00021;
vec2 fxCoordRef = fxCoord;
shapeScale.x *= 4;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#elif RAYMODE == 2
vec2 rayCenter = vec2(0, 0);
vec2 rayDelta = fxCoord - rayCenter;
fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4;
fxCoord.y = max(rayDelta.x, rayDelta.y);
//fxCoord.y = length(rayDelta);
fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y);
vec2 fxCoordRef = fxCoord;
shapeScale.x *= 4;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#else
//fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
vec2 fxCoordRef = fxCoord;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#endif
float grad = 1.0 - fxCoord.y;
mask *= grad;
vec2 fxCoord2 = fxCoord;
fxCoord.xy *= vec2(0.054111 * shapeScale.x, 0.003111 * shapeScale.y);
fxCoord2.xy *= vec2(0.07333 * shapeScale.x, 0.005967111 * shapeScale.y);
fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111);
fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399);
float fx0 = texSample2D(g_Texture1, fxCoord).r;
float fx1 = texSample2D(g_Texture1, fxCoord2).r;
float fx = fx0 * fx1;
fx = pow(fx, g_Exponent);
fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx);
#if RENDERING == 0
vec3 fxColor = mix(g_ColorRaysStart, g_ColorRaysEnd, fxCoordRef.y) * g_Intensity;
#else
vec2 gradientUVs = vec2(fxCoordRef.y, 0);
#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88
vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr;
#else
vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb;
#endif
vec3 fxColor = gradColor * g_Intensity;
#endif
#if MASK
float maskSample = texSample2D(g_Texture3, v_TexCoord.zw).r;
//albedo = mix(sample, albedo, mask);
mask *= maskSample;
#endif
fx *= mask;
albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor, fx);
albedo.a = max(albedo.a, fx);
#if WRITEALPHA
albedo.a = fx;
#endif
gl_FragColor = albedo;
}

View File

@@ -0,0 +1,34 @@
#include "common.h"
#include "common_perspective.h"
uniform mat4 g_ModelViewProjectionMatrix;
#if MASK
uniform vec4 g_Texture3Resolution;
#endif
uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881","require":{"DIRECTDRAW":0}}
attribute vec3 a_Position;
attribute vec2 a_TexCoord;
varying vec4 v_TexCoord;
varying vec3 v_TexCoordFx;
void main() {
mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3));
v_TexCoord = a_TexCoord.xyxy;
v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform);
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
#if MASK
v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x,
a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y);
#endif
}

View File

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

View File

@@ -0,0 +1,33 @@
{
"version" : 1,
"replacementkey" : "lightshafts",
"name" : "ui_editor_effect_light_shafts_title",
"description" : "ui_editor_effect_light_shafts_description",
"group" : "colorize",
"preview" : "preview/project.json",
"passes" :
[
{
"material" : "materials/effects/lightshafts.json"
}
],
"dependencies" :
[
"materials/effects/lightshafts.json",
"shaders/effects/lightshafts.frag",
"shaders/effects/lightshafts.vert"
],
"gizmos" :
[
{
"type" : "EffectPerspectiveUV",
"vars" :
{
"p0" : "point0",
"p1" : "point1",
"p2" : "point2",
"p3" : "point3"
}
}
]
}

View File

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

View File

@@ -0,0 +1,275 @@
{
"name" : "ui_editor_preset_light_shafts_title",
"description" : "ui_editor_preset_light_shafts_description",
"tag" : "scene2d",
"group" : "preset",
"options" :
{
"droplistVisible" : true,
"droplistOptions" :
[
{
"label" : "ui_editor_preset_light_shafts_variant_corner",
"value" : 0
},
{
"label" : "ui_editor_preset_light_shafts_variant_radial",
"value" : 1
},
{
"label" : "ui_editor_preset_light_shafts_variant_directional",
"value" : 2
},
{
"label" : "ui_editor_preset_light_shafts_variant_dust_motes",
"value" : 3
},
{
"label" : "ui_editor_preset_light_shafts_variant_1",
"value" : 4
},
{
"label" : "ui_editor_preset_light_shafts_variant_2",
"value" : 5
},
{
"label" : "ui_editor_preset_light_shafts_variant_3",
"value" : 6
}
]
},
"variants" :
[
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 2,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 0.85,
"point0" : "0.85704 0.06238",
"point1" : "0.94690 0.66185",
"point2" : "0.07415 0.95000",
"point3" : "0.24560 0.09457",
"rayfeather" : "0.22 0.1",
"rayradius" : 0.15,
"rayscale" : "0.4 1.01",
"raysmoothness" : 0.54,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - corner",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 1,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1.12,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.75 0.25",
"point1" : "0.75 0.75",
"point2" : "0.25 0.75",
"point3" : "0.25 0.25",
"rayfeather" : "0.01 0.07",
"rayradius" : 0.14,
"rayscale" : "0.66 1.01",
"raysmoothness" : 0.6,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - radial",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "",
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"name" : "",
"passes" :
[
{
"combos" :
{
"RAYMODE" : 0,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 0.9,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.4 0.25",
"point1" : "0.6 0.25",
"point2" : "0.8 0.8",
"point3" : "0.2 0.8",
"rayfeather" : "0.16 0.13",
"rayradius" : 0.14,
"rayscale" : "0.8 0.2",
"raysmoothness" : 0.5,
"rayspeed" : 0.38999999
}
}
],
"visible" : true
}
],
"name" : "Light shafts - linear",
"shape" : "quad"
}
],
"dependencies" :
[
{
"file" : "effects/lightshafts/effect.json"
}
]
},
{
"preview" : "previewdustmotes0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Dust motes",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/dust_motes_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/dust_motes_0.json",
"particles/presets/dust_motes_0.json"
]
},
{
"preview" : "previewlightshafts0/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 0",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_0.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_0.json",
"particles/presets/light_shafts_0.json"
]
},
{
"preview" : "previewlightshafts1/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 1",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_1.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_1.json",
"particles/presets/light_shafts_1.json"
]
},
{
"preview" : "previewlightshafts2/project.json",
"objects" :
[
{
"angles" : "0.000 0.000 0.000",
"name" : "Light shafts 2",
"origin" : "0.000 0.000 0.000",
"particle" : "particles/presets/light_shafts_2.json",
"scale" : "1.000 1.000 1.000"
}
],
"dependencies" :
[
"materials/presets/light_shafts_2.json",
"particles/presets/light_shafts_2.json"
]
}
]
}

View File

@@ -0,0 +1,19 @@
{
"file" : "scene.json",
"general" :
{
"properties" :
{
"schemecolor" :
{
"order" : 0,
"text" : "ui_browse_properties_scheme_color",
"type" : "color",
"value" : "0 0 0"
}
}
},
"title" : "previewlightshafteffectcorner",
"type" : "scene",
"version" : 0
}

View File

@@ -0,0 +1,96 @@
{
"camera" :
{
"center" : "0.00000 0.00000 -1.00000",
"eye" : "0.00000 0.00000 0.00000",
"up" : "0.00000 1.00000 0.00000"
},
"general" :
{
"ambientcolor" : "0.30000 0.30000 0.30000",
"bloom" : false,
"bloomhdrfeather" : 0.1,
"bloomhdriterations" : 8,
"bloomhdrscatter" : 1.619,
"bloomhdrstrength" : 2.0,
"bloomhdrthreshold" : 1.0,
"bloomstrength" : 2.0,
"bloomthreshold" : 0.64999998,
"bloomtint" : "1.00000 1.00000 1.00000",
"camerafade" : true,
"cameraparallax" : false,
"cameraparallaxamount" : 0.5,
"cameraparallaxdelay" : 0.1,
"cameraparallaxmouseinfluence" : 0.0,
"camerapreview" : true,
"camerashake" : false,
"camerashakeamplitude" : 0.5,
"camerashakeroughness" : 1.0,
"camerashakespeed" : 3.0,
"clearcolor" : "0.38824 0.38824 0.38824",
"clearenabled" : true,
"farz" : 10000.0,
"fov" : 50.0,
"hdr" : false,
"nearz" : 0.0099999998,
"orthogonalprojection" :
{
"height" : 256,
"width" : 256
},
"perspectiveoverridefov" : 95.0,
"skylightcolor" : "0.30000 0.30000 0.30000",
"zoom" : 1.0
},
"objects" :
[
{
"castshadow" : false,
"effects" :
[
{
"file" : "effects/lightshafts/effect.json",
"id" : 21,
"name" : "",
"passes" :
[
{
"combos" :
{
"DIRECTDRAW" : 1,
"RAYMODE" : 1,
"RENDERING" : 1
},
"constantshadervalues" :
{
"colorastart" : "1 1 1",
"colorend" : "0.43529411764705883 0.8862745098039215 1",
"colorwexponent" : 1.12,
"colorwintensity" : 2,
"noiseamount" : 0.33000001,
"noisescale" : 1.17,
"point0" : "0.75 0.25",
"point1" : "0.75 0.75",
"point2" : "0.25 0.75",
"point3" : "0.25 0.25",
"rayfeather" : "0.01 0.07",
"rayradius" : 0.14,
"rayscale" : "0.66 1.01",
"raysmoothness" : 0.6,
"rayspeed" : 0.38999999
},
"id" : 22
}
],
"visible" : true
}
],
"id" : 20,
"name" : "Light shafts - radial",
"origin" : "128.00000 128.00000 0.00000",
"scale" : "2.09076 2.09076 2.09076",
"shape" : "quad"
}
],
"version" : 0
}

View File

@@ -0,0 +1,124 @@
// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31,"require":{"DIRECTDRAW":0}}
// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0,"require":{"DIRECTDRAW":0}}
// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_directional":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}}
// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}}
#include "common_fragment.h"
#include "common_blending.h"
varying vec4 v_TexCoord;
varying vec3 v_TexCoordFx;
uniform sampler2D g_Texture0; // {"hidden":true}
uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"}
uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}}
uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"DIRECTDRAW":0}}
uniform float g_Time;
uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0],"group":"ui_editor_properties_shape"}
uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0],"group":"ui_editor_properties_shape","group":"ui_editor_properties_shape"}
uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0],"group":"ui_editor_properties_blending"}
uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5],"group":"ui_editor_properties_blending"}
uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.2,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"}
uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0],"group":"ui_editor_properties_shape"}
uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"}
uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0],"group":"ui_editor_properties_blending"}
uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":1,"range":[0.2, 2.0],"group":"ui_editor_properties_blending"}
uniform vec3 g_ColorRaysStart; // {"material":"colorastart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color","group":"ui_editor_properties_blending"}
uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color","group":"ui_editor_properties_blending"}
void main() {
vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z;
#if DIRECTDRAW
vec4 albedo = CAST4(0.0);
#else
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
#endif
float mask = step(0.0, v_TexCoordFx.z);
vec2 shapeScale = g_Scale;
#if RAYMODE == 1
vec2 rayCenter = vec2(0.5, 0.5);
vec2 rayDelta = fxCoord - rayCenter;
fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5;
fxCoord.y = length(rayDelta) * 2.0;
//fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y);
fxCoord.y = (fxCoord.y - 0.0001) * 1.00021;
vec2 fxCoordRef = fxCoord;
shapeScale.x *= 4;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#elif RAYMODE == 2
vec2 rayCenter = vec2(0, 0);
vec2 rayDelta = fxCoord - rayCenter;
fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4;
fxCoord.y = max(rayDelta.x, rayDelta.y);
//fxCoord.y = length(rayDelta);
fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y);
vec2 fxCoordRef = fxCoord;
shapeScale.x *= 4;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#else
//fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5);
vec2 fxCoordRef = fxCoord;
mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5));
mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5));
#endif
float grad = 1.0 - fxCoord.y;
mask *= grad;
vec2 fxCoord2 = fxCoord;
fxCoord.xy *= vec2(0.054111 * shapeScale.x, 0.003111 * shapeScale.y);
fxCoord2.xy *= vec2(0.07333 * shapeScale.x, 0.005967111 * shapeScale.y);
fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111);
fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399);
float fx0 = texSample2D(g_Texture1, fxCoord).r;
float fx1 = texSample2D(g_Texture1, fxCoord2).r;
float fx = fx0 * fx1;
fx = pow(fx, g_Exponent);
fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx);
#if RENDERING == 0
vec3 fxColor = mix(g_ColorRaysStart, g_ColorRaysEnd, fxCoordRef.y) * g_Intensity;
#else
vec2 gradientUVs = vec2(fxCoordRef.y, 0);
#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88
vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr;
#else
vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb;
#endif
vec3 fxColor = gradColor * g_Intensity;
#endif
#if MASK
float maskSample = texSample2D(g_Texture3, v_TexCoord.zw).r;
//albedo = mix(sample, albedo, mask);
mask *= maskSample;
#endif
fx *= mask;
albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor, fx);
albedo.a = max(albedo.a, fx);
#if WRITEALPHA
albedo.a = fx;
#endif
gl_FragColor = albedo;
}

View File

@@ -0,0 +1,34 @@
#include "common.h"
#include "common_perspective.h"
uniform mat4 g_ModelViewProjectionMatrix;
#if MASK
uniform vec4 g_Texture3Resolution;
#endif
uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592","require":{"DIRECTDRAW":0}}
uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881","require":{"DIRECTDRAW":0}}
attribute vec3 a_Position;
attribute vec2 a_TexCoord;
varying vec4 v_TexCoord;
varying vec3 v_TexCoordFx;
void main() {
mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3));
v_TexCoord = a_TexCoord.xyxy;
v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform);
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
#if MASK
v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x,
a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y);
#endif
}

View File

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