forked from LeenkxTeam/LNXSDK
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
7f9a7c9b4a | |||
7433409cda | |||
2a6e05aff1 | |||
348d7bf343 |
@ -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) {
|
||||||
|
@ -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('}')
|
||||||
|
@ -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'}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user