forked from LeenkxTeam/LNXSDK
Repe [T3DU] and Moises Jpelaez updates
This commit is contained in:
@ -58,6 +58,7 @@ def make(context_id, rpasses):
|
||||
con['alpha_blend_destination'] = mat.lnx_blending_destination_alpha
|
||||
con['alpha_blend_operation'] = mat.lnx_blending_operation_alpha
|
||||
con['depth_write'] = False
|
||||
con['compare_mode'] = mat.lnx_compare_mode
|
||||
elif particle:
|
||||
pass
|
||||
# Depth prepass was performed, exclude mat with depth read that
|
||||
@ -500,7 +501,13 @@ def make_forward_solid(con_mesh):
|
||||
vert.add_uniform('float texUnpack', link='_texUnpack')
|
||||
if mat_state.material.lnx_tilesheet_flag:
|
||||
vert.add_uniform('vec2 tilesheetOffset', '_tilesheetOffset')
|
||||
vert.write('texCoord = tex * texUnpack + tilesheetOffset;')
|
||||
vert.add_uniform('vec2 tilesheetFlip', '_tilesheetFlip')
|
||||
vert.add_uniform('vec2 tilesheetTiles', '_tilesheetTiles')
|
||||
vert.write('vec2 tileSize = vec2(1.0 / tilesheetTiles.x, 1.0 / tilesheetTiles.y);')
|
||||
vert.write('vec2 tileUV = tex * texUnpack;')
|
||||
vert.write('tileUV.x = mix(tileUV.x, tileSize.x - tileUV.x, tilesheetFlip.x);')
|
||||
vert.write('tileUV.y = mix(tileUV.y, tileSize.y - tileUV.y, tilesheetFlip.y);')
|
||||
vert.write('texCoord = tileUV + tilesheetOffset;')
|
||||
else:
|
||||
vert.write('texCoord = tex * texUnpack;')
|
||||
|
||||
@ -571,7 +578,7 @@ def make_forward(con_mesh):
|
||||
frag.write('fragColor[0].rgb = tonemapFilmic(fragColor[0].rgb);')
|
||||
|
||||
# Particle opacity
|
||||
if mat_state.material.lnx_particle_flag and lnx.utils.get_rp().lnx_particles == 'On' and mat_state.material.lnx_particle_fade:
|
||||
if mat_state.material.lnx_particle_flag and lnx.utils.get_rp().lnx_particles == 'GPU' and mat_state.material.lnx_particle_fade:
|
||||
frag.write('fragColor[0].rgb *= p_fade;')
|
||||
|
||||
|
||||
@ -695,10 +702,10 @@ def make_forward_base(con_mesh, parse_opacity=False, transluc_pass=False):
|
||||
if '_Brdf' in wrd.world_defs:
|
||||
frag.write('envl.rgb *= 1.0 - F;')
|
||||
if '_Rad' in wrd.world_defs:
|
||||
frag.write('envl += prefilteredColor * F;')
|
||||
frag.write('envl += prefilteredColor * F * 1.5;')
|
||||
elif '_EnvCol' in wrd.world_defs:
|
||||
frag.add_uniform('vec3 backgroundCol', link='_backgroundCol')
|
||||
frag.write('envl += backgroundCol * F;')
|
||||
frag.write('envl += backgroundCol * F * 1.5;')
|
||||
|
||||
frag.add_uniform('float envmapStrength', link='_envmapStrength')
|
||||
frag.write('envl *= envmapStrength * occlusion;')
|
||||
|
||||
Reference in New Issue
Block a user