Faster forward path

This commit is contained in:
Lubos Lenco 2017-09-07 16:23:17 +02:00
parent 7472fb6f20
commit 110b143bd2
3 changed files with 7 additions and 1 deletions

View file

@ -41,7 +41,7 @@ class NavMesh extends Trait {
public function findPath(from:Vec4, to:Vec4, done:Array<Vec4>->Void) {
if (!ready) return;
recast.findPath(from.x, from.z, from.y, to.x, to.z, to.y, 1000, function(path:Array<RecastWaypoint>) {
recast.findPath(from.x, from.z, from.y, to.x, to.z, to.y, 200, function(path:Array<RecastWaypoint>) {
var ar:Array<Vec4> = [];
for (p in path) ar.push(new Vec4(p.x, p.z, -p.y));
done(ar);

View file

@ -330,6 +330,9 @@ def make_forward(rpdat):
nodes['Begin'].inputs[1].default_value = rpdat.rp_hdr
nodes['Screen'].inputs[0].default_value = int(rpdat.rp_supersampling)
if not rpdat.rp_hdr:
nodes['lbuf'].inputs[4].default_value = 'RGBA32'
if rpdat.rp_shadowmap != 'None':
n = nodes['Shadow Map']
n.inputs[1].default_value = n.inputs[2].default_value = int(rpdat.rp_shadowmap)
@ -386,6 +389,9 @@ def make_forward(rpdat):
if rpdat.rp_overlays:
links.new(last_node.outputs[0], nodes['Clear Target Overlay'].inputs[0])
if not rpdat.rp_compositornodes:
relink(last_node, 'Copy')
def make_deferred(rpdat):
nodes['Begin'].inputs[1].default_value = rpdat.rp_hdr

Binary file not shown.