Spoort for displacement in instanced objects
This commit is contained in:
parent
5c1b55d221
commit
14a8d8698f
|
@ -185,6 +185,8 @@ def make_base(con_mesh, parse_opacity):
|
|||
sh = vert
|
||||
else:
|
||||
sh = tese
|
||||
if(con_mesh.is_elem('ipos')):
|
||||
vert.write('wposition = vec4(W * spos).xyz;')
|
||||
sh.add_uniform('mat4 VP', '_viewProjectionMatrix')
|
||||
sh.write('wposition += wnormal * disp;')
|
||||
sh.write('gl_Position = VP * vec4(wposition, 1.0);')
|
||||
|
|
Loading…
Reference in a new issue