Skip to content

Commit

Permalink
fix make_mesh and forward render path
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002e committed Sep 6, 2024
1 parent 8559bd2 commit f092ee3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Sources/armory/renderpath/RenderPathForward.hx
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,13 @@ class RenderPathForward {
}
#end

#if rp_ssrefr
{
path.setTarget("gbuffer_refraction");
path.clearTarget(0xffffff00);
}
#end

RenderPathCreator.setTargetMeshes();

#if rp_shadowmap
Expand Down
2 changes: 1 addition & 1 deletion blender/arm/material/make_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def make_forward_base(con_mesh, parse_opacity=False, transluc_pass=False):
frag.add_uniform('sampler3D voxels')
frag.add_uniform('sampler3D voxelsSDF')
frag.write('if (opacity < 1.0) {')
frag.write(' vec3 refraction = traceRefraction(wposition, n, voxels, voxelsSDF, vVec, ior, roughness, clipmaps, gl_FragCoord.xy).rgb * voxelgiRefr;')
frag.write(' vec3 refraction = traceRefraction(wposition, n, voxels, voxelsSDF, vVec, ior, roughness, clipmaps, texCoord).rgb * voxelgiRefr;')
frag.write(' indirect = mix(refraction, indirect, opacity);')
frag.write(' direct = mix(refraction, direct, opacity);')
frag.write('}')
Expand Down

0 comments on commit f092ee3

Please sign in to comment.