Fix same-name assets

This commit is contained in:
Lubos Lenco 2018-02-24 12:16:11 +01:00
parent 7b5ef5c740
commit 3392f3117a
4 changed files with 41 additions and 7 deletions

View file

@ -238,6 +238,16 @@ void main() {
#endif
#endif
#ifdef _CSharpen
vec3 col1 = texture(tex, texCo + vec2(-texStep.x, -texStep.y) * 1.5).rgb;
vec3 col2 = texture(tex, texCo + vec2(texStep.x, -texStep.y) * 1.5).rgb;
vec3 col3 = texture(tex, texCo + vec2(-texStep.x, texStep.y) * 1.5).rgb;
vec3 col4 = texture(tex, texCo + vec2(texStep.x, texStep.y) * 1.5).rgb;
vec3 colavg = (col1 + col2 + col3 + col4) * 0.25;
// const float sharpness = 0.5;
fragColor.rgb += (fragColor.rgb - colavg) * sharpness;
#endif
#ifdef _CFog
// if (depth < 1.0) {
@ -360,5 +370,4 @@ void main() {
#ifdef _CLUT
fragColor = LUTlookup(fragColor, lutTexture);
#endif
}

View file

@ -0,0 +1,18 @@
package armory.data;
typedef TConfig = {
var version:String;
var debug_console:Bool;
var window_mode:Int; // window, borderless, fullscreen
var window_w:Int;
var window_h:Int;
var window_vsync:Bool;
var window_msaa:Int;
var rp_supersample:Int; // 1, 1.5, 2, 4
var rp_shadowmap:Int;
var rp_voxelgi:Int; // off, ao, ao_revox, gi, gi_revox
var rp_ssgi:Bool;
var rp_ssr:Bool;
var rp_bloom:Bool;
var rp_motionblur:Bool;
}

View file

@ -11,6 +11,7 @@ class GetContactsNode extends LogicNode {
override function get(from:Int):Dynamic {
var object:Object = inputs[0].get();
if (object == null) return null;
#if arm_physics
var physics = armory.trait.physics.PhysicsWorld.active;

View file

@ -47,12 +47,18 @@ def reset():
def add(file):
global assets
if file not in assets:
assets.append(file)
# Reserved file name
for s in reserved_names:
if s in file:
print('Armory Warning: File "{0}" contains reserved keyword, this will break C++ builds!'.format(file))
if file in assets:
return
base = os.path.basename(file)
for f in assets:
if f.endswith(base):
print('Armory Warning: Asset name "{0}" already exists, skipping'.format(base))
return
assets.append(file)
# Reserved file name
for f in reserved_names:
if f in file:
print('Armory Warning: File "{0}" contains reserved keyword, this will break C++ builds!'.format(file))
def add_khafile_def(d):
global khafile_defs