Forward / Mobile / Solid

This commit is contained in:
2026-09-16 12:40:39 -07:00
parent 73e4a0ad30
commit 56d1b0e4a7
11 changed files with 306 additions and 88 deletions

View File

@ -46,9 +46,11 @@ def write(vert: shader.Shader, frag: shader.Shader):
if is_transparent_shadows:
frag.add_uniform('samplerCube shadowMapPointTransparent[4]', included=True)
if not '_VoxelAOvar' in wrd.world_defs and not '_VoxelGI' in wrd.world_defs or ((parse_opacity or '_VoxelShadow' in wrd.world_defs) and ('_VoxelAOvar' in wrd.world_defs or '_VoxelGI' in wrd.world_defs)):
vert.add_out('vec4 wvpposition')
vert.write('wvpposition = gl_Position;')
#if not '_VoxelAOvar' in wrd.world_defs and not '_VoxelGI' in wrd.world_defs or ((parse_opacity or '_VoxelShadow' in wrd.world_defs) and ('_VoxelAOvar' in wrd.world_defs or '_VoxelGI' in wrd.world_defs)):
#vert.add_out('vec4 wvpposition')
#vert.write('wvpposition = gl_Position;')
vert.add_out('vec4 wvpposition')
vert.write('wvpposition = gl_Position;')
# wvpposition.z / wvpposition.w
frag.write('float viewz = linearize(gl_FragCoord.z, cameraProj);')
frag.write('int clusterI = getClusterI((wvpposition.xy / wvpposition.w) * 0.5 + 0.5, viewz, cameraPlane);')

View File

@ -51,7 +51,7 @@ def get_rpasses(material):
ar.append('translucent')
elif is_transluc(material) and not material.lnx_discard and not material.lnx_blending and rpdat.rp_ss_refraction:
ar.append('refraction')
if rpdat.rp_voxels != "Off" and has_voxels:
if rpdat.rp_voxels != "Off" and has_voxels and rpdat.lnx_material_model == 'Full':
ar.append('voxel')
if rpdat.rp_renderer == 'Forward' and rpdat.rp_depthprepass and not material.lnx_blending and not material.lnx_particle_flag:
ar.append('depth')