From 3b4f409bb0181961cc4458fecd1d3587c6025be6 Mon Sep 17 00:00:00 2001 From: elmar Date: Mon, 30 Mar 2020 08:39:56 +0200 Subject: [PATCH] added Support for RSSprite --- python2.7libs/materialBuild_RS/eg_setupOGL.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python2.7libs/materialBuild_RS/eg_setupOGL.py b/python2.7libs/materialBuild_RS/eg_setupOGL.py index 1f11f71..3121c47 100644 --- a/python2.7libs/materialBuild_RS/eg_setupOGL.py +++ b/python2.7libs/materialBuild_RS/eg_setupOGL.py @@ -171,12 +171,22 @@ def link_textures(self): # Normal Texture if(i[0].inputIndex() == 49): self.mb.parm("ogl_normalmap").set(i[0].inputNode().parm("ms_normal"), follow_parm_reference=False) + # Sprite + elif i[0].inputNode().type().name() == "redshift::Sprite": + # Diffuse Texture + if i[0].inputIndex() == 0: + self.mb.parm("ogl_diffr").set(1, follow_parm_reference=False) + self.mb.parm("ogl_diffg").set(1, follow_parm_reference=False) + self.mb.parm("ogl_diffb").set(1, follow_parm_reference=False) + self.mb.parm("ogl_tex1").set(i[0].inputNode().parm("tex0"), follow_parm_reference=False) if i[0].inputNode().type().name() == "redshift::NormalMap": # Normal Texture if(i[0].inputIndex() == 49): self.mb.parm("ogl_normalmap").set(i[0].inputNode().parm("tex0"), follow_parm_reference=False) + + def link_vparm(self, target, source): """Link a single Vector Parm""" self.mb.parm(target + "r").set(self.rs_mat.parm(source + "r"), follow_parm_reference=False)