armory/blender/arm/material/make_overlay.py

16 lines
533 B
Python
Raw Normal View History

2017-03-15 12:30:14 +01:00
import arm.material.cycles as cycles
import arm.material.mat_state as mat_state
import arm.material.make_mesh as make_mesh
2016-12-19 01:25:22 +01:00
def make(context_id):
2016-12-20 00:39:18 +01:00
con_overlay = mat_state.data.add_context({ 'name': context_id, 'depth_write': True, 'compare_mode': 'less', 'cull_mode': 'clockwise' })
2017-02-15 12:42:40 +01:00
make_mesh.make_base(con_overlay, parse_opacity=False)
frag = con_overlay.frag
frag.add_out('vec4 fragColor')
frag.write('fragColor = vec4(basecol, 1.0);')
frag.write('fragColor.rgb = pow(fragColor.rgb, vec3(1.0 / 2.2));')
2016-12-20 00:39:18 +01:00
return con_overlay