Correct normals for instanced rendering when transparency enabled

This commit is contained in:
QuantumCoderQC 2020-09-16 23:20:57 +02:00
parent c3092e781c
commit fcc1db0743

View file

@ -14,7 +14,7 @@ def inst_pos(con, vert):
vert.write(' croty * srotz * srotx + sroty * crotx, -crotz * srotx, -sroty * srotz * srotx + croty * crotx')
vert.write(');')
vert.write('spos.xyz = mirot * spos.xyz;')
if con.data['name'] == 'mesh':
if((con.data['name'] == 'mesh' or 'translucent') and vert.contains('wnormal')):
vert.write('wnormal = transpose(inverse(mirot)) * wnormal;')
if con.is_elem('iscl'):