Compare commits

..

17 Commits
main ... main

Author SHA1 Message Date
ed932e3fa4 Update leenkx/blender/lnx/material/cycles_nodes/nodes_shader.py 2025-02-06 17:13:41 +00:00
f00edd882f Update leenkx/blender/lnx/material/cycles_nodes/nodes_shader.py 2025-02-06 17:08:33 +00:00
f403955fcd Update leenkx/blender/lnx/utils.py 2025-02-05 23:03:31 +00:00
a562af9b60 Update Kha/Backends/Kinc-HL/kinc-bridge/shader.c.h 2025-02-01 17:09:05 +00:00
bdd9b0197f Update lib/aura/Backends/hl/aura/math/FFT.h 2025-02-01 16:02:29 +00:00
f200933375 Update lib/aura/Backends/hl/aura/aurahl.c 2025-02-01 14:18:03 +00:00
829ef5f269 Update Kha/Kinc/Sources/kinc/input/gamepad.h 2025-02-01 14:10:05 +00:00
0d73133f36 Update Kha/Backends/Kinc-HL/kinc-bridge/system.c.h 2025-02-01 14:08:47 +00:00
181b860360 Update Kha/Backends/Kinc-HL/kinc-bridge/kinc.c.h 2025-02-01 13:53:43 +00:00
20db9cc24d Update Kha/Backends/Kinc-HL/kinc-bridge/compute.c.h 2025-02-01 12:16:54 +00:00
c67b38ea1e Update Compute Shader 2025-01-31 20:35:00 +00:00
adb95eab1e Hashlink Voxels Fix 2025-01-31 20:05:18 +00:00
93addd1200 Update Kha/Backends/Kinc-HL/hl/include/mbedtls/library/entropy_poll.c 2025-01-31 20:00:32 +00:00
7f9a7c9b4a Update leenkx/blender/lnx/material/make_mesh.py 2025-01-31 12:37:04 +00:00
7433409cda Anti aliasing only working with TAA 2025-01-31 08:56:57 +00:00
2a6e05aff1 Update new repo node links 2025-01-31 07:17:39 +00:00
348d7bf343 Merge pull request 'More 4.3 + support' (#3) from Onek8/LNXSDK:main into main
Reviewed-on: LeenkxTeam/LNXSDK#3
2025-01-30 13:43:29 +00:00
13 changed files with 913 additions and 1048 deletions

View File

@ -18,7 +18,7 @@
* *
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#define _GNU_SOURCE
#if !defined(MBEDTLS_CONFIG_FILE) #if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h" #include "mbedtls/config.h"
#else #else

View File

@ -1,179 +1,38 @@
#include <kinc/compute/compute.h> #include <kinc/graphics4/compute.h>
#include <kinc/graphics4/texture.h> #include <kinc/graphics4/texture.h>
#include <hl.h> #include <hl.h>
vbyte *hl_kinc_compute_create_shader(vbyte *data, int length) { vbyte *hl_kinc_g4_compute_create_shader(vbyte *data, int length) {
kinc_compute_shader_t *shader = (kinc_compute_shader_t *)malloc(sizeof(kinc_compute_shader_t)); kinc_g4_compute_shader *shader = (kinc_g4_compute_shader *)malloc(sizeof(kinc_g4_compute_shader));
kinc_compute_shader_init(shader, data, length); kinc_g4_compute_shader_init(shader, data, length);
return (vbyte *)shader; return (vbyte *)shader;
} }
void hl_kinc_compute_delete_shader(vbyte *shader) { void hl_kinc_g4_compute_delete_shader(vbyte *shader) {
kinc_compute_shader_t *sh = (kinc_compute_shader_t *)shader; kinc_g4_compute_shader *sh = (kinc_g4_compute_shader *)shader;
kinc_compute_shader_destroy(sh); kinc_g4_compute_shader_destroy(sh);
free(sh); free(sh);
} }
vbyte *hl_kinc_compute_get_constantlocation(vbyte *shader, vbyte *name) { vbyte *hl_kinc_g4_compute_get_constantlocation(vbyte *shader, vbyte *name) {
kinc_compute_shader_t *sh = (kinc_compute_shader_t *)shader; kinc_g4_compute_shader *sh = (kinc_g4_compute_shader *)shader;
kinc_compute_constant_location_t *location = (kinc_compute_constant_location_t *)malloc(sizeof(kinc_compute_constant_location_t)); kinc_g4_constant_location_t *location = (kinc_g4_constant_location_t *)malloc(sizeof(kinc_g4_constant_location_t));
*location = kinc_compute_shader_get_constant_location(sh, (char *)name), sizeof(kinc_compute_constant_location_t); *location = kinc_g4_compute_shader_get_constant_location(sh, (char *)name), sizeof(kinc_g4_constant_location_t);
return (vbyte *)location; return (vbyte *)location;
} }
vbyte *hl_kinc_compute_get_textureunit(vbyte *shader, vbyte *name) { vbyte *hl_kinc_g4_compute_get_textureunit(vbyte *shader, vbyte *name) {
kinc_compute_shader_t *sh = (kinc_compute_shader_t *)shader; kinc_g4_compute_shader *sh = (kinc_g4_compute_shader *)shader;
kinc_compute_texture_unit_t *unit = (kinc_compute_texture_unit_t *)malloc(sizeof(kinc_compute_texture_unit_t)); kinc_g4_texture_unit_t *unit = (kinc_g4_texture_unit_t *)malloc(sizeof(kinc_g4_texture_unit_t));
*unit = kinc_compute_shader_get_texture_unit(sh, (char *)name), sizeof(kinc_compute_texture_unit_t); *unit = kinc_g4_compute_shader_get_texture_unit(sh, (char *)name), sizeof(kinc_g4_texture_unit_t);
return (vbyte *)unit; return (vbyte *)unit;
} }
void hl_kinc_compute_set_bool(vbyte *location, bool value) { void hl_kinc_g4_set_compute_shader(vbyte *shader) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location; kinc_g4_set_compute_shader((kinc_g4_compute_shader *)shader);
kinc_compute_set_bool(*loc, value);
} }
void hl_kinc_compute_set_int(vbyte *location, int value) { void hl_kinc_g4_compute(int x, int y, int z) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location; kinc_g4_compute(x, y, z);
kinc_compute_set_int(*loc, value);
}
void hl_kinc_compute_set_float(vbyte *location, float value) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
kinc_compute_set_float(*loc, value);
}
void hl_kinc_compute_set_float2(vbyte *location, float value1, float value2) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
kinc_compute_set_float2(*loc, value1, value2);
}
void hl_kinc_compute_set_float3(vbyte *location, float value1, float value2, float value3) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
kinc_compute_set_float3(*loc, value1, value2, value3);
}
void hl_kinc_compute_set_float4(vbyte *location, float value1, float value2, float value3, float value4) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
kinc_compute_set_float4(*loc, value1, value2, value3, value4);
}
void hl_kinc_compute_set_floats(vbyte *location, vbyte *values, int count) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
kinc_compute_set_floats(*loc, (float *)values, count);
}
void hl_kinc_compute_set_matrix(vbyte *location, float _00, float _10, float _20, float _30, float _01, float _11, float _21, float _31, float _02, float _12,
float _22, float _32, float _03, float _13, float _23, float _33) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
kinc_matrix4x4_t value;
kinc_matrix4x4_set(&value, 0, 0, _00);
kinc_matrix4x4_set(&value, 0, 1, _01);
kinc_matrix4x4_set(&value, 0, 2, _02);
kinc_matrix4x4_set(&value, 0, 3, _03);
kinc_matrix4x4_set(&value, 1, 0, _10);
kinc_matrix4x4_set(&value, 1, 1, _11);
kinc_matrix4x4_set(&value, 1, 2, _12);
kinc_matrix4x4_set(&value, 1, 3, _13);
kinc_matrix4x4_set(&value, 2, 0, _20);
kinc_matrix4x4_set(&value, 2, 1, _21);
kinc_matrix4x4_set(&value, 2, 2, _22);
kinc_matrix4x4_set(&value, 2, 3, _23);
kinc_matrix4x4_set(&value, 3, 0, _30);
kinc_matrix4x4_set(&value, 3, 1, _31);
kinc_matrix4x4_set(&value, 3, 2, _32);
kinc_matrix4x4_set(&value, 3, 3, _33);
kinc_compute_set_matrix4(*loc, &value);
}
void hl_kinc_compute_set_matrix3(vbyte *location, float _00, float _10, float _20, float _01, float _11, float _21, float _02, float _12, float _22) {
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
kinc_matrix3x3_t value;
kinc_matrix3x3_set(&value, 0, 0, _00);
kinc_matrix3x3_set(&value, 0, 1, _01);
kinc_matrix3x3_set(&value, 0, 2, _02);
kinc_matrix3x3_set(&value, 1, 0, _10);
kinc_matrix3x3_set(&value, 1, 1, _11);
kinc_matrix3x3_set(&value, 1, 2, _12);
kinc_matrix3x3_set(&value, 2, 0, _20);
kinc_matrix3x3_set(&value, 2, 1, _21);
kinc_matrix3x3_set(&value, 2, 2, _22);
kinc_compute_set_matrix3(*loc, &value);
}
void hl_kinc_compute_set_texture(vbyte *unit, vbyte *texture, int access) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_texture_t *tex = (kinc_g4_texture_t *)texture;
kinc_compute_set_texture(*u, tex, (kinc_compute_access_t)access);
}
void hl_kinc_compute_set_target(vbyte *unit, vbyte *renderTarget, int access) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_render_target_t *rt = (kinc_g4_render_target_t *)renderTarget;
kinc_compute_set_render_target(*u, rt, (kinc_compute_access_t)access);
}
void hl_kinc_compute_set_sampled_texture(vbyte *unit, vbyte *texture) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_texture_t *tex = (kinc_g4_texture_t *)texture;
kinc_compute_set_sampled_texture(*u, tex);
}
void hl_kinc_compute_set_sampled_target(vbyte *unit, vbyte *renderTarget) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_render_target_t *rt = (kinc_g4_render_target_t *)renderTarget;
kinc_compute_set_sampled_render_target(*u, rt);
}
void hl_kinc_compute_set_sampled_depth_target(vbyte *unit, vbyte *renderTarget) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_render_target_t *rt = (kinc_g4_render_target_t *)renderTarget;
kinc_compute_set_sampled_depth_from_render_target(*u, rt);
}
void hl_kinc_compute_set_sampled_cubemap_texture(vbyte *unit, vbyte *texture) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_texture_t *tex = (kinc_g4_texture_t *)texture;
kinc_compute_set_sampled_texture(*u, tex);
}
void hl_kinc_compute_set_sampled_cubemap_target(vbyte *unit, vbyte *renderTarget) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_render_target_t *rt = (kinc_g4_render_target_t *)renderTarget;
kinc_compute_set_sampled_render_target(*u, rt);
}
void hl_kinc_compute_set_sampled_cubemap_depth_target(vbyte *unit, vbyte *renderTarget) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_g4_render_target_t *rt = (kinc_g4_render_target_t *)renderTarget;
kinc_compute_set_sampled_depth_from_render_target(*u, rt);
}
void hl_kinc_compute_set_texture_parameters(vbyte *unit, int uAddressing, int vAddressing, int minificationFilter, int magnificationFilter, int mipmapFilter) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_compute_set_texture_addressing(*u, KINC_G4_TEXTURE_DIRECTION_U, (kinc_g4_texture_addressing_t)uAddressing);
kinc_compute_set_texture_addressing(*u, KINC_G4_TEXTURE_DIRECTION_V, (kinc_g4_texture_addressing_t)vAddressing);
kinc_compute_set_texture_minification_filter(*u, (kinc_g4_texture_filter_t)minificationFilter);
kinc_compute_set_texture_magnification_filter(*u, (kinc_g4_texture_filter_t)magnificationFilter);
kinc_compute_set_texture_mipmap_filter(*u, (kinc_g4_mipmap_filter_t)mipmapFilter);
}
void hl_kinc_compute_set_texture3d_parameters(vbyte *unit, int uAddressing, int vAddressing, int wAddressing, int minificationFilter, int magnificationFilter,
int mipmapFilter) {
kinc_compute_texture_unit_t *u = (kinc_compute_texture_unit_t *)unit;
kinc_compute_set_texture3d_addressing(*u, KINC_G4_TEXTURE_DIRECTION_U, (kinc_g4_texture_addressing_t)uAddressing);
kinc_compute_set_texture3d_addressing(*u, KINC_G4_TEXTURE_DIRECTION_V, (kinc_g4_texture_addressing_t)vAddressing);
kinc_compute_set_texture3d_addressing(*u, KINC_G4_TEXTURE_DIRECTION_W, (kinc_g4_texture_addressing_t)wAddressing);
kinc_compute_set_texture3d_minification_filter(*u, (kinc_g4_texture_filter_t)minificationFilter);
kinc_compute_set_texture3d_magnification_filter(*u, (kinc_g4_texture_filter_t)magnificationFilter);
kinc_compute_set_texture3d_mipmap_filter(*u, (kinc_g4_mipmap_filter_t)mipmapFilter);
}
void hl_kinc_compute_set_shader(vbyte *shader) {
kinc_compute_set_shader((kinc_compute_shader_t *)shader);
}
void hl_kinc_compute_compute(int x, int y, int z) {
kinc_compute(x, y, z);
} }

View File

@ -42,8 +42,8 @@ static void update(void *data) {
static bool mixThreadregistered = false; static bool mixThreadregistered = false;
static void mix(kinc_a2_buffer_t *buffer, int samples) { static void mix(kinc_a2_buffer_t *buffer, uint32_t samples, void *userdata) {
#ifdef KORE_MULTITHREADED_AUDIO #ifdef KINC_MULTITHREADED_AUDIO
if (!mixThreadregistered) { if (!mixThreadregistered) {
vdynamic *ret; vdynamic *ret;
hl_register_thread(&ret); hl_register_thread(&ret);
@ -54,16 +54,18 @@ static void mix(kinc_a2_buffer_t *buffer, int samples) {
audioCallCallback(samples); audioCallCallback(samples);
for (int i = 0; i < samples; ++i) { for (uint32_t i = 0; i < samples; i += 2) {
float value = audioReadSample(); float left_value = audioReadSample();
*(float *)&buffer->data[buffer->write_location] = value; float right_value = audioReadSample();
buffer->write_location += 4; *(float *)&buffer->channels[0][buffer->write_location] = left_value;
*(float *)&buffer->channels[1][buffer->write_location] = right_value;
buffer->write_location += 1;
if (buffer->write_location >= buffer->data_size) { if (buffer->write_location >= buffer->data_size) {
buffer->write_location = 0; buffer->write_location = 0;
} }
} }
#ifdef KORE_MULTITHREADED_AUDIO #ifdef KINC_MULTITHREADED_AUDIO
hl_blocking(false); hl_blocking(false);
#endif #endif
} }
@ -92,9 +94,9 @@ void hl_init_kore(vbyte *title, int width, int height, int samplesPerPixel, bool
void hl_kinc_init_audio(vclosure *callCallback, vclosure *readSample, int *outSamplesPerSecond) { void hl_kinc_init_audio(vclosure *callCallback, vclosure *readSample, int *outSamplesPerSecond) {
audioCallCallback = *((FN_AUDIO_CALL_CALLBACK *)(&callCallback->fun)); audioCallCallback = *((FN_AUDIO_CALL_CALLBACK *)(&callCallback->fun));
audioReadSample = *((FN_AUDIO_READ_SAMPLE *)(&readSample->fun)); audioReadSample = *((FN_AUDIO_READ_SAMPLE *)(&readSample->fun));
kinc_a2_set_callback(mix); kinc_a2_set_callback(mix, NULL);
kinc_a2_init(); kinc_a2_init();
*outSamplesPerSecond = kinc_a2_samples_per_second; *outSamplesPerSecond = kinc_a2_samples_per_second();
} }
void hl_run_kore(void) { void hl_run_kore(void) {

View File

@ -94,11 +94,11 @@ void hl_kinc_system_load_url(vbyte *url) {
} }
vbyte *hl_kinc_get_gamepad_id(int index) { vbyte *hl_kinc_get_gamepad_id(int index) {
return (vbyte*)kinc_gamepad_product_name(index); return (vbyte *)kinc_gamepad_product_name(index);
} }
vbyte *hl_kinc_get_gamepad_vendor(int index) { vbyte *hl_kinc_get_gamepad_vendor(int index) {
return (vbyte*)kinc_gamepad_vendor(index); return (vbyte *)kinc_gamepad_vendor(index);
} }
bool hl_kinc_gamepad_connected(int index) { bool hl_kinc_gamepad_connected(int index) {
@ -137,12 +137,12 @@ void hl_kinc_register_pen(vclosure *penDown, vclosure *penUp, vclosure *penMove)
kinc_pen_set_move_callback(*((FN_PEN_MOVE *)(&penMove->fun))); kinc_pen_set_move_callback(*((FN_PEN_MOVE *)(&penMove->fun)));
} }
typedef void (*FN_GAMEPAD_AXIS)(int, int, float); typedef void (*FN_GAMEPAD_AXIS)(int, int, float, void *);
typedef void (*FN_GAMEPAD_BUTTON)(int, int, float); typedef void (*FN_GAMEPAD_BUTTON)(int, int, float, void *);
void hl_kinc_register_gamepad(vclosure *gamepadAxis, vclosure *gamepadButton) { void hl_kinc_register_gamepad(vclosure *gamepadAxis, vclosure *gamepadButton) {
kinc_gamepad_set_axis_callback(*((FN_GAMEPAD_AXIS *)(&gamepadAxis->fun))); kinc_gamepad_set_axis_callback(*((FN_GAMEPAD_AXIS *)(&gamepadAxis->fun)), NULL);
kinc_gamepad_set_button_callback(*((FN_GAMEPAD_BUTTON *)(&gamepadButton->fun))); kinc_gamepad_set_button_callback(*((FN_GAMEPAD_BUTTON *)(&gamepadButton->fun)), NULL);
} }
typedef void (*FN_TOUCH_START)(int, int, int); typedef void (*FN_TOUCH_START)(int, int, int);

View File

@ -1213,7 +1213,7 @@ class Inc {
kha.compute.Compute.setSampledTexture(voxel_td4, rts.get("voxelsSDF").image); kha.compute.Compute.setSampledTexture(voxel_td4, rts.get("voxelsSDF").image);
kha.compute.Compute.setTexture(voxel_te4, rts.get("voxels_specular").image, kha.compute.Access.Write); kha.compute.Compute.setTexture(voxel_te4, rts.get("voxels_specular").image, kha.compute.Access.Write);
kha.compute.Compute.setSampledTexture(voxel_tf4, rts.get("gbuffer2").image); //kha.compute.Compute.setSampledTexture(voxel_tf4, rts.get("gbuffer2").image);
var fa:Float32Array = new Float32Array(Main.voxelgiClipmapCount * 10); var fa:Float32Array = new Float32Array(Main.voxelgiClipmapCount * 10);
for (i in 0...Main.voxelgiClipmapCount) { for (i in 0...Main.voxelgiClipmapCount) {

View File

@ -139,6 +139,9 @@ if bpy.app.version > (4, 1, 0):
subsurface_radius = c.parse_vector_input(node.inputs[9]) subsurface_radius = c.parse_vector_input(node.inputs[9])
subsurface_color = c.parse_vector_input(node.inputs[8]) subsurface_color = c.parse_vector_input(node.inputs[8])
state.out_metallic = c.parse_value_input(node.inputs[1]) state.out_metallic = c.parse_value_input(node.inputs[1])
if bpy.app.version > (4, 2, 4):
state.out_specular = c.parse_value_input(node.inputs[13])
else:
state.out_specular = c.parse_value_input(node.inputs[12]) state.out_specular = c.parse_value_input(node.inputs[12])
state.out_roughness = c.parse_value_input(node.inputs[2]) state.out_roughness = c.parse_value_input(node.inputs[2])
# Prevent black material when metal = 1.0 and roughness = 0.0 # Prevent black material when metal = 1.0 and roughness = 0.0

View File

@ -686,9 +686,9 @@ def make_forward_base(con_mesh, parse_opacity=False, transluc_pass=False):
if parse_opacity: if parse_opacity:
frag.write('indirect = traceDiffuse(wposition, n, voxels, clipmaps).rgb * albedo * voxelgiDiff;') frag.write('indirect = traceDiffuse(wposition, n, voxels, clipmaps).rgb * albedo * voxelgiDiff;')
frag.write('if (roughness < 1.0 && specular > 0.0){') frag.write('if (roughness < 1.0 && specular > 0.0){')
#frag.add_uniform('sampler2D sveloc') frag.add_uniform('sampler2D sveloc')
#frag.write(' vec2 velocity = -textureLod(sveloc, gl_FragCoord.xy, 0.0).rg;') frag.write(' vec2 velocity = -textureLod(sveloc, gl_FragCoord.xy, 0.0).rg;')
frag.write(' indirect += traceSpecular(wposition, n, voxels, voxelsSDF, normalize(eye - wposition), roughness, clipmaps, gl_FragCoord.xy).rgb * specular * voxelgiRefl;}') frag.write(' indirect += traceSpecular(wposition, n, voxels, voxelsSDF, normalize(eye - wposition), roughness, clipmaps, gl_FragCoord.xy, velocity).rgb * specular * voxelgiRefl;}')
else: else:
frag.add_uniform("sampler2D voxels_diffuse") frag.add_uniform("sampler2D voxels_diffuse")
frag.add_uniform("sampler2D voxels_specular") frag.add_uniform("sampler2D voxels_specular")
@ -779,9 +779,10 @@ def make_forward_base(con_mesh, parse_opacity=False, transluc_pass=False):
if '_MicroShadowing' in wrd.world_defs: if '_MicroShadowing' in wrd.world_defs:
frag.write(', occlusion') frag.write(', occlusion')
if '_SSRS' in wrd.world_defs: if '_SSRS' in wrd.world_defs:
frag.add_uniform('sampler2D gbufferD', top=True)
frag.add_uniform('mat4 invVP', '_inverseViewProjectionMatrix') frag.add_uniform('mat4 invVP', '_inverseViewProjectionMatrix')
frag.add_uniform('vec3 eye', '_cameraPosition') frag.add_uniform('vec3 eye', '_cameraPosition')
frag.write(', gl_FragCoord.z, inVP, eye') frag.write(', gbufferD, invVP, eye')
frag.write(');') frag.write(');')
if '_Clusters' in wrd.world_defs: if '_Clusters' in wrd.world_defs:
@ -794,8 +795,8 @@ def make_forward_base(con_mesh, parse_opacity=False, transluc_pass=False):
if '_VoxelRefract' in wrd.world_defs and parse_opacity: if '_VoxelRefract' in wrd.world_defs and parse_opacity:
frag.write('if (opacity < 1.0) {') frag.write('if (opacity < 1.0) {')
#frag.write(' vec2 velocity = -textureLod(sveloc, gl_FragCoord.xy, 0.0).rg;') frag.write(' vec2 velocity = -textureLod(sveloc, gl_FragCoord.xy, 0.0).rg;')
frag.write(' vec3 refraction = traceRefraction(wposition, n, voxels, voxelsSDF, normalize(eye - wposition), ior, roughness, clipmaps, gl_FragCoord.xy).rgb;') frag.write(' vec3 refraction = traceRefraction(wposition, n, voxels, voxelsSDF, normalize(eye - wposition), ior, roughness, clipmaps, gl_FragCoord.xy,velocity).rgb;')
frag.write(' indirect = mix(refraction, indirect, opacity) * voxelgiRefr;') frag.write(' indirect = mix(refraction, indirect, opacity) * voxelgiRefr;')
frag.write(' direct = mix(refraction, direct, opacity) * voxelgiRefr;') frag.write(' direct = mix(refraction, direct, opacity) * voxelgiRefr;')
frag.write('}') frag.write('}')

View File

@ -264,7 +264,7 @@ class LnxOpenNodeHaxeSource(bpy.types.Operator):
version = lnx.utils.get_last_commit() version = lnx.utils.get_last_commit()
if version == '': if version == '':
version = 'main' version = 'main'
webbrowser.open(f'https://github.com/leenkx3d/leenkx/blob/{version}/leenkx/Sources/leenkx/logicnode/{name}.hx') webbrowser.open(f'https://dev.leenkx.com/LeenkxTeam/LNXSDK/src/branch/{version}/leenkx/Sources/leenkx/logicnode/{name}.hx')
return{'FINISHED'} return{'FINISHED'}
@ -282,7 +282,7 @@ class LnxOpenNodePythonSource(bpy.types.Operator):
if version == '': if version == '':
version = 'main' version = 'main'
rel_path = node.__module__.replace('.', '/') rel_path = node.__module__.replace('.', '/')
webbrowser.open(f'https://github.com/leenkx3d/leenkx/blob/{version}/leenkx/blender/{rel_path}.py') webbrowser.open(f'https://dev.leenkx.com/LeenkxTeam/LNXSDK/src/branch/{version}/leenkx/blender/{rel_path}.py')
return{'FINISHED'} return{'FINISHED'}

View File

@ -216,7 +216,7 @@ def is_gapi_gl_es() -> bool:
def get_rp() -> lnx.props_renderpath.LnxRPListItem: def get_rp() -> lnx.props_renderpath.LnxRPListItem:
wrd = bpy.data.worlds['Lnx'] wrd = bpy.data.worlds['Lnx']
if not state.is_export and wrd.lnx_play_renderpath != '': if not state.is_export and wrd.lnx_play_renderpath != '' and lnx.props_renderpath.LnxRPListItem.get_by_name(wrd.lnx_play_renderpath) is not None:
return lnx.props_renderpath.LnxRPListItem.get_by_name(wrd.lnx_play_renderpath) return lnx.props_renderpath.LnxRPListItem.get_by_name(wrd.lnx_play_renderpath)
else: else:
return wrd.lnx_rplist[wrd.lnx_rplist_index] return wrd.lnx_rplist[wrd.lnx_rplist_index]

View File

@ -1,3 +1,3 @@
// Keep this file so that the headers are included in the compilation // Keep this file so that the headers are included in the compilation
#include "hl/aura/math/fft.h" #include "hl/aura/math/FFT.h"
#include "hl/aura/types/complex_array.h" #include "hl/aura/types/complex_array.h"

View File

@ -2,27 +2,27 @@
#include <hl.h> #include <hl.h>
#include <aura/types/_ComplexArray/HL_ComplexArrayImpl.h> //#include <aura/types/_ComplexArray/HL_ComplexArrayImpl.h>
#include "hl/aura/aurahl.h" #include "hl/aura/aurahl.h"
#include "common_c/math/fft.h" #include "common_c/math/fft.h"
#include "common_c/types/complex_t.h" #include "common_c/types/complex_t.h"
HL_PRIM void AURA_HL_FUNC(ditfft2)(aura__types___ComplexArray__HL_ComplexArrayImpl time_array, int t, aura__types___ComplexArray__HL_ComplexArrayImpl freq_array, int f, int n, int step, bool inverse) { //HL_PRIM void AURA_HL_FUNC(ditfft2)(aura__types___ComplexArray__HL_ComplexArrayImpl time_array, int t, aura__types___ComplexArray__HL_ComplexArrayImpl freq_array, int f, int n, int step, bool inverse) {
const aura_complex_t *times = (aura_complex_t*) time_array->self; // const aura_complex_t *times = (aura_complex_t*) time_array->self;
aura_complex_t *freqs = (aura_complex_t*) freq_array->self; // aura_complex_t *freqs = (aura_complex_t*) freq_array->self;
aura_ditfft2(times, t, freqs, f, n, step, inverse); /// aura_ditfft2(times, t, freqs, f, n, step, inverse);
} //}
HL_PRIM void AURA_HL_FUNC(ditfft2_iterative)(aura__types___ComplexArray__HL_ComplexArrayImpl time_array, aura__types___ComplexArray__HL_ComplexArrayImpl freq_array, int n, bool inverse, aura__types___ComplexArray__HL_ComplexArrayImpl exp_rotation_step_table) { //HL_PRIM void AURA_HL_FUNC(ditfft2_iterative)(aura__types___ComplexArray__HL_ComplexArrayImpl time_array, aura__types___ComplexArray__HL_ComplexArrayImpl freq_array, int n, bool inverse, aura__types___ComplexArray__HL_ComplexArrayImpl exp_rotation_step_table) {
const aura_complex_t *times = (aura_complex_t*) time_array->self; // const aura_complex_t *times = (aura_complex_t*) time_array->self;
aura_complex_t *freqs = (aura_complex_t*) freq_array->self; // aura_complex_t *freqs = (aura_complex_t*) freq_array->self;
const aura_complex_t *exp_lut = (aura_complex_t*) exp_rotation_step_table->self; // const aura_complex_t *exp_lut = (aura_complex_t*) exp_rotation_step_table->self;
aura_ditfft2_iterative(times, freqs, n, inverse, exp_lut); // aura_ditfft2_iterative(times, freqs, n, inverse, exp_lut);
} //}
DEFINE_PRIM(_VOID, ditfft2, _BYTES _I32 _BYTES _I32 _I32 _I32 _BOOL) //DEFINE_PRIM(_VOID, ditfft2, _BYTES _I32 _BYTES _I32 _I32 _I32 _BOOL)
DEFINE_PRIM(_VOID, ditfft2_iterative, _BYTES _BYTES _I32 _BOOL _BYTES) //DEFINE_PRIM(_VOID, ditfft2_iterative, _BYTES _BYTES _I32 _BOOL _BYTES)