Consolidate and update

This commit is contained in:
2026-10-27 15:58:22 -07:00
parent eb211da457
commit 6c13722fc6
42 changed files with 498 additions and 169 deletions

View File

@ -80,9 +80,6 @@ def write(vert, particle_info=None, shadowmap=False):
vert.add_const('float', 'P_NORMAL_FACTOR', str(normal_factor))
if (shadowmap and normal_factor != 0.0):
vert.add_out('vec3 N')
if ramp_el_len != 0:
vert.add_const('float', 'P_SIZE_OVER_TIME_FACTOR', str(size_over_time_factor))
@ -156,6 +153,7 @@ def write(vert, particle_info=None, shadowmap=False):
vert.write('p_velocity.z += (fhash(gl_InstanceID + pd_random + 2 * pd[0][3]) * 2.0 / pd_size - 1.0 / pd_size) * pd[1][3];')
if normal_factor != 0.0:
vert.add_uniform('mat3 N', '_normalMatrix')
vert.write('if (P_NORMAL_FACTOR != 0.0) {')
vert.write(' vec3 local_normal_dir = normalize(ipos);')
vert.write(' vec3 world_emitter_normal = normalize(N * local_normal_dir);')