forked from LeenkxTeam/LNXSDK
Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
ed932e3fa4 | |||
f00edd882f | |||
f403955fcd | |||
a562af9b60 | |||
bdd9b0197f | |||
f200933375 | |||
829ef5f269 | |||
0d73133f36 | |||
181b860360 | |||
20db9cc24d | |||
c67b38ea1e | |||
adb95eab1e | |||
93addd1200 | |||
7f9a7c9b4a | |||
7433409cda | |||
2a6e05aff1 | |||
348d7bf343 |
@ -18,7 +18,7 @@
|
||||
*
|
||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
|
@ -1,179 +1,38 @@
|
||||
#include <kinc/compute/compute.h>
|
||||
#include <kinc/graphics4/compute.h>
|
||||
#include <kinc/graphics4/texture.h>
|
||||
|
||||
#include <hl.h>
|
||||
|
||||
vbyte *hl_kinc_compute_create_shader(vbyte *data, int length) {
|
||||
kinc_compute_shader_t *shader = (kinc_compute_shader_t *)malloc(sizeof(kinc_compute_shader_t));
|
||||
kinc_compute_shader_init(shader, data, length);
|
||||
vbyte *hl_kinc_g4_compute_create_shader(vbyte *data, int length) {
|
||||
kinc_g4_compute_shader *shader = (kinc_g4_compute_shader *)malloc(sizeof(kinc_g4_compute_shader));
|
||||
kinc_g4_compute_shader_init(shader, data, length);
|
||||
return (vbyte *)shader;
|
||||
}
|
||||
|
||||
void hl_kinc_compute_delete_shader(vbyte *shader) {
|
||||
kinc_compute_shader_t *sh = (kinc_compute_shader_t *)shader;
|
||||
kinc_compute_shader_destroy(sh);
|
||||
void hl_kinc_g4_compute_delete_shader(vbyte *shader) {
|
||||
kinc_g4_compute_shader *sh = (kinc_g4_compute_shader *)shader;
|
||||
kinc_g4_compute_shader_destroy(sh);
|
||||
free(sh);
|
||||
}
|
||||
|
||||
vbyte *hl_kinc_compute_get_constantlocation(vbyte *shader, vbyte *name) {
|
||||
kinc_compute_shader_t *sh = (kinc_compute_shader_t *)shader;
|
||||
kinc_compute_constant_location_t *location = (kinc_compute_constant_location_t *)malloc(sizeof(kinc_compute_constant_location_t));
|
||||
*location = kinc_compute_shader_get_constant_location(sh, (char *)name), sizeof(kinc_compute_constant_location_t);
|
||||
vbyte *hl_kinc_g4_compute_get_constantlocation(vbyte *shader, vbyte *name) {
|
||||
kinc_g4_compute_shader *sh = (kinc_g4_compute_shader *)shader;
|
||||
kinc_g4_constant_location_t *location = (kinc_g4_constant_location_t *)malloc(sizeof(kinc_g4_constant_location_t));
|
||||
*location = kinc_g4_compute_shader_get_constant_location(sh, (char *)name), sizeof(kinc_g4_constant_location_t);
|
||||
return (vbyte *)location;
|
||||
}
|
||||
|
||||
vbyte *hl_kinc_compute_get_textureunit(vbyte *shader, vbyte *name) {
|
||||
kinc_compute_shader_t *sh = (kinc_compute_shader_t *)shader;
|
||||
kinc_compute_texture_unit_t *unit = (kinc_compute_texture_unit_t *)malloc(sizeof(kinc_compute_texture_unit_t));
|
||||
*unit = kinc_compute_shader_get_texture_unit(sh, (char *)name), sizeof(kinc_compute_texture_unit_t);
|
||||
vbyte *hl_kinc_g4_compute_get_textureunit(vbyte *shader, vbyte *name) {
|
||||
kinc_g4_compute_shader *sh = (kinc_g4_compute_shader *)shader;
|
||||
kinc_g4_texture_unit_t *unit = (kinc_g4_texture_unit_t *)malloc(sizeof(kinc_g4_texture_unit_t));
|
||||
*unit = kinc_g4_compute_shader_get_texture_unit(sh, (char *)name), sizeof(kinc_g4_texture_unit_t);
|
||||
return (vbyte *)unit;
|
||||
}
|
||||
|
||||
void hl_kinc_compute_set_bool(vbyte *location, bool value) {
|
||||
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
|
||||
kinc_compute_set_bool(*loc, value);
|
||||
void hl_kinc_g4_set_compute_shader(vbyte *shader) {
|
||||
kinc_g4_set_compute_shader((kinc_g4_compute_shader *)shader);
|
||||
}
|
||||
|
||||
void hl_kinc_compute_set_int(vbyte *location, int value) {
|
||||
kinc_compute_constant_location_t *loc = (kinc_compute_constant_location_t *)location;
|
||||
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);
|
||||
void hl_kinc_g4_compute(int x, int y, int z) {
|
||||
kinc_g4_compute(x, y, z);
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ static void update(void *data) {
|
||||
|
||||
static bool mixThreadregistered = false;
|
||||
|
||||
static void mix(kinc_a2_buffer_t *buffer, int samples) {
|
||||
#ifdef KORE_MULTITHREADED_AUDIO
|
||||
static void mix(kinc_a2_buffer_t *buffer, uint32_t samples, void *userdata) {
|
||||
#ifdef KINC_MULTITHREADED_AUDIO
|
||||
if (!mixThreadregistered) {
|
||||
vdynamic *ret;
|
||||
hl_register_thread(&ret);
|
||||
@ -54,16 +54,18 @@ static void mix(kinc_a2_buffer_t *buffer, int samples) {
|
||||
|
||||
audioCallCallback(samples);
|
||||
|
||||
for (int i = 0; i < samples; ++i) {
|
||||
float value = audioReadSample();
|
||||
*(float *)&buffer->data[buffer->write_location] = value;
|
||||
buffer->write_location += 4;
|
||||
for (uint32_t i = 0; i < samples; i += 2) {
|
||||
float left_value = audioReadSample();
|
||||
float right_value = audioReadSample();
|
||||
*(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) {
|
||||
buffer->write_location = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef KORE_MULTITHREADED_AUDIO
|
||||
#ifdef KINC_MULTITHREADED_AUDIO
|
||||
hl_blocking(false);
|
||||
#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) {
|
||||
audioCallCallback = *((FN_AUDIO_CALL_CALLBACK *)(&callCallback->fun));
|
||||
audioReadSample = *((FN_AUDIO_READ_SAMPLE *)(&readSample->fun));
|
||||
kinc_a2_set_callback(mix);
|
||||
kinc_a2_set_callback(mix, NULL);
|
||||
kinc_a2_init();
|
||||
*outSamplesPerSecond = kinc_a2_samples_per_second;
|
||||
*outSamplesPerSecond = kinc_a2_samples_per_second();
|
||||
}
|
||||
|
||||
void hl_run_kore(void) {
|
||||
|
@ -94,11 +94,11 @@ void hl_kinc_system_load_url(vbyte *url) {
|
||||
}
|
||||
|
||||
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) {
|
||||
return (vbyte*)kinc_gamepad_vendor(index);
|
||||
return (vbyte *)kinc_gamepad_vendor(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)));
|
||||
}
|
||||
|
||||
typedef void (*FN_GAMEPAD_AXIS)(int, int, float);
|
||||
typedef void (*FN_GAMEPAD_BUTTON)(int, int, float);
|
||||
typedef void (*FN_GAMEPAD_AXIS)(int, int, float, void *);
|
||||
typedef void (*FN_GAMEPAD_BUTTON)(int, int, float, void *);
|
||||
|
||||
void hl_kinc_register_gamepad(vclosure *gamepadAxis, vclosure *gamepadButton) {
|
||||
kinc_gamepad_set_axis_callback(*((FN_GAMEPAD_AXIS *)(&gamepadAxis->fun)));
|
||||
kinc_gamepad_set_button_callback(*((FN_GAMEPAD_BUTTON *)(&gamepadButton->fun)));
|
||||
kinc_gamepad_set_axis_callback(*((FN_GAMEPAD_AXIS *)(&gamepadAxis->fun)), NULL);
|
||||
kinc_gamepad_set_button_callback(*((FN_GAMEPAD_BUTTON *)(&gamepadButton->fun)), NULL);
|
||||
}
|
||||
|
||||
typedef void (*FN_TOUCH_START)(int, int, int);
|
||||
|
@ -1213,7 +1213,7 @@ class Inc {
|
||||
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.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);
|
||||
for (i in 0...Main.voxelgiClipmapCount) {
|
||||
|
@ -139,6 +139,9 @@ if bpy.app.version > (4, 1, 0):
|
||||
subsurface_radius = c.parse_vector_input(node.inputs[9])
|
||||
subsurface_color = c.parse_vector_input(node.inputs[8])
|
||||
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_roughness = c.parse_value_input(node.inputs[2])
|
||||
# Prevent black material when metal = 1.0 and roughness = 0.0
|
||||
|
@ -686,9 +686,9 @@ def make_forward_base(con_mesh, parse_opacity=False, transluc_pass=False):
|
||||
if parse_opacity:
|
||||
frag.write('indirect = traceDiffuse(wposition, n, voxels, clipmaps).rgb * albedo * voxelgiDiff;')
|
||||
frag.write('if (roughness < 1.0 && specular > 0.0){')
|
||||
#frag.add_uniform('sampler2D sveloc')
|
||||
#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.add_uniform('sampler2D sveloc')
|
||||
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, velocity).rgb * specular * voxelgiRefl;}')
|
||||
else:
|
||||
frag.add_uniform("sampler2D voxels_diffuse")
|
||||
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:
|
||||
frag.write(', occlusion')
|
||||
if '_SSRS' in wrd.world_defs:
|
||||
frag.add_uniform('sampler2D gbufferD', top=True)
|
||||
frag.add_uniform('mat4 invVP', '_inverseViewProjectionMatrix')
|
||||
frag.add_uniform('vec3 eye', '_cameraPosition')
|
||||
frag.write(', gl_FragCoord.z, inVP, eye')
|
||||
frag.write(', gbufferD, invVP, eye')
|
||||
frag.write(');')
|
||||
|
||||
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:
|
||||
frag.write('if (opacity < 1.0) {')
|
||||
#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(' 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,velocity).rgb;')
|
||||
frag.write(' indirect = mix(refraction, indirect, opacity) * voxelgiRefr;')
|
||||
frag.write(' direct = mix(refraction, direct, opacity) * voxelgiRefr;')
|
||||
frag.write('}')
|
||||
|
@ -264,7 +264,7 @@ class LnxOpenNodeHaxeSource(bpy.types.Operator):
|
||||
version = lnx.utils.get_last_commit()
|
||||
if version == '':
|
||||
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'}
|
||||
|
||||
|
||||
@ -282,7 +282,7 @@ class LnxOpenNodePythonSource(bpy.types.Operator):
|
||||
if version == '':
|
||||
version = 'main'
|
||||
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'}
|
||||
|
||||
|
||||
|
@ -216,7 +216,7 @@ def is_gapi_gl_es() -> bool:
|
||||
|
||||
def get_rp() -> lnx.props_renderpath.LnxRPListItem:
|
||||
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)
|
||||
else:
|
||||
return wrd.lnx_rplist[wrd.lnx_rplist_index]
|
||||
|
@ -1,3 +1,3 @@
|
||||
// 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"
|
||||
|
@ -2,27 +2,27 @@
|
||||
|
||||
#include <hl.h>
|
||||
|
||||
#include <aura/types/_ComplexArray/HL_ComplexArrayImpl.h>
|
||||
//#include <aura/types/_ComplexArray/HL_ComplexArrayImpl.h>
|
||||
|
||||
#include "hl/aura/aurahl.h"
|
||||
#include "common_c/math/fft.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) {
|
||||
const aura_complex_t *times = (aura_complex_t*) time_array->self;
|
||||
aura_complex_t *freqs = (aura_complex_t*) freq_array->self;
|
||||
//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;
|
||||
// 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) {
|
||||
const aura_complex_t *times = (aura_complex_t*) time_array->self;
|
||||
aura_complex_t *freqs = (aura_complex_t*) freq_array->self;
|
||||
//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;
|
||||
// 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_iterative, _BYTES _BYTES _I32 _BOOL _BYTES)
|
||||
//DEFINE_PRIM(_VOID, ditfft2, _BYTES _I32 _BYTES _I32 _I32 _I32 _BOOL)
|
||||
//DEFINE_PRIM(_VOID, ditfft2_iterative, _BYTES _BYTES _I32 _BOOL _BYTES)
|
||||
|
Loading…
x
Reference in New Issue
Block a user