本文整理匯總了Python中rpcore.loader.RPLoader.load_sliced_3d_texture方法的典型用法代碼示例。如果您正苦於以下問題:Python RPLoader.load_sliced_3d_texture方法的具體用法?Python RPLoader.load_sliced_3d_texture怎麽用?Python RPLoader.load_sliced_3d_texture使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rpcore.loader.RPLoader
的用法示例。
在下文中一共展示了RPLoader.load_sliced_3d_texture方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _load_lut
# 需要導入模塊: from rpcore.loader import RPLoader [as 別名]
# 或者: from rpcore.loader.RPLoader import load_sliced_3d_texture [as 別名]
def _load_lut(self):
""" Loads the color correction lookup table (LUT) """
lut_path = self.get_resource(self.get_setting("color_lut"))
lut = RPLoader.load_sliced_3d_texture(lut_path, 64)
lut.set_wrap_u(SamplerState.WM_clamp)
lut.set_wrap_v(SamplerState.WM_clamp)
lut.set_wrap_w(SamplerState.WM_clamp)
lut.set_minfilter(SamplerState.FT_linear)
lut.set_magfilter(SamplerState.FT_linear)
lut.set_anisotropic_degree(0)
self._tonemapping_stage.set_shader_input("ColorLUT", lut)
示例2: load
# 需要導入模塊: from rpcore.loader import RPLoader [as 別名]
# 或者: from rpcore.loader.RPLoader import load_sliced_3d_texture [as 別名]
def load(self):
""" Loads the scattering method """
lut_src = self.handle.get_resource(
"HosekWilkieScattering/scattering_luit.png")
if not isfile(lut_src):
self.error("Could not find precompiled LUT for the Hosek Wilkie "
"Scattering! Make sure you compiled the algorithm code!")
return
lut_tex = RPLoader.load_sliced_3d_texture(lut_src, 512, 128, 100)
lut_tex.set_wrap_u(SamplerState.WM_repeat)
lut_tex.set_wrap_v(SamplerState.WM_clamp)
lut_tex.set_wrap_w(SamplerState.WM_clamp)
lut_tex.set_minfilter(SamplerState.FT_linear)
lut_tex.set_magfilter(SamplerState.FT_linear)
# Setting the format explicitely shouldn't be necessary
# lut_tex.set_format(Image.F_rgb16)
self.handle.display_stage.set_shader_input("ScatteringLUT", lut_tex)
self.handle.envmap_stage.set_shader_input("ScatteringLUT", lut_tex)