本文整理汇总了Python中rpcore.image.Image.create_2d_array方法的典型用法代码示例。如果您正苦于以下问题:Python Image.create_2d_array方法的具体用法?Python Image.create_2d_array怎么用?Python Image.create_2d_array使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rpcore.image.Image
的用法示例。
在下文中一共展示了Image.create_2d_array方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create
# 需要导入模块: from rpcore.image import Image [as 别名]
# 或者: from rpcore.image.Image import create_2d_array [as 别名]
def create(self):
self.target = self.create_target("FlagUsedCells")
self.target.prepare_buffer()
self.cell_grid_flags = Image.create_2d_array(
"CellGridFlags", 0, 0,
self._pipeline.settings["lighting.culling_grid_slices"], "R8")
self.target.set_shader_input("cellGridFlags", self.cell_grid_flags)
示例2: create
# 需要导入模块: from rpcore.image import Image [as 别名]
# 或者: from rpcore.image.Image import create_2d_array [as 别名]
def create(self):
self.target = self.create_target("CollectUsedCells")
self.target.size = 0, 0
self.target.prepare_buffer()
self.cell_list_buffer = Image.create_buffer("CellList", 0, "R32I")
self.cell_index_buffer = Image.create_2d_array("CellIndices", 0, 0, 0, "R32I")
self.target.set_shader_inputs(
CellListBuffer=self.cell_list_buffer,
CellListIndices=self.cell_index_buffer)
示例3: create
# 需要导入模块: from rpcore.image import Image [as 别名]
# 或者: from rpcore.image.Image import create_2d_array [as 别名]
def create(self):
self.target = self.create_target("FlagUsedCells")
self.target.prepare_buffer()
tile_amount = self._pipeline.light_mgr.num_tiles
self.cell_grid_flags = Image.create_2d_array(
"CellGridFlags", tile_amount.x, tile_amount.y,
self._pipeline.settings["lighting.culling_grid_slices"], "R8")
self.cell_grid_flags.set_clear_color(0)
self.target.set_shader_input("cellGridFlags", self.cell_grid_flags)
示例4: create
# 需要导入模块: from rpcore.image import Image [as 别名]
# 或者: from rpcore.image.Image import create_2d_array [as 别名]
def create(self):
tile_amount = self._pipeline.light_mgr.num_tiles
self.target = self.create_target("CollectUsedCells")
self.target.size = tile_amount.x, tile_amount.y
self.target.prepare_buffer()
num_slices = self._pipeline.settings["lighting.culling_grid_slices"]
max_cells = tile_amount.x * tile_amount.y * num_slices
self.debug("Allocating", max_cells, "cells")
self._cell_list_buffer = Image.create_buffer("CellList", 1 + max_cells, "R32I")
self._cell_list_buffer.set_clear_color(0)
self._cell_index_buffer = Image.create_2d_array(
"CellIndices", tile_amount.x, tile_amount.y, num_slices, "R32I")
self._cell_index_buffer.set_clear_color(0)
self.target.set_shader_input("CellListBuffer", self._cell_list_buffer)
self.target.set_shader_input("CellListIndices", self._cell_index_buffer)