Expose normal attribute

This commit is contained in:
unknown 2019-08-17 21:29:28 +02:00
parent 1cfea64a84
commit df3a7b72cf

View file

@ -106,6 +106,10 @@ def make(con_mesh):
vert.write('eyeDirCam = vec4(WV * spos).xyz; eyeDirCam.z *= -1;')
frag.write_attrib('vec3 vVecCam = normalize(eyeDirCam);')
if frag.contains('nAttr'):
vert.add_out('vec3 nAttr')
vert.write_attrib('nAttr = vec3(nor.xy, pos.w);')
wrd = bpy.data.worlds['Arm']
if '_Legacy' in wrd.world_defs:
frag.replace('sampler2DShadow', 'sampler2D')