MCPcopy Create free account
hub / github.com/carbonengine/trinity / Sampler

Class Sampler

shadercompiler/python/shadercompiler/effectinfo.py:213–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211
212
213class Sampler(object):
214 def __init__(self, stream, string_table, version):
215 self.register_index = stream.read_uint8()
216 if version >= 4:
217 self.name = string_table.get_string(stream.read_uint32())
218 else:
219 self.name = ''
220 self.is_comparison = stream.read_uint8() != 0
221 self.min_filter = stream.read_uint8()
222 self.max_filter = stream.read_uint8()
223 self.mip_filter = stream.read_uint8()
224 self.address_u = stream.read_uint8()
225 self.address_v = stream.read_uint8()
226 self.address_w = stream.read_uint8()
227 self.mip_lod_bias = stream.read_float()
228 self.max_anisotropy = stream.read_uint8()
229 self.comparison_func = stream.read_uint8()
230 self.border_color = stream.read_float(), stream.read_float(), stream.read_float(), stream.read_float()
231 self.min_lod = stream.read_float()
232 self.max_lod = stream.read_float()
233 if version < 4:
234 stream.read_uint8()
235 if version > 12:
236 self.is_dynamic = stream.read_uint8() != 0
237 if not self.is_dynamic:
238 self.name = ''
239 else:
240 self.is_dynamic = True
241
242
243class StaticSampler(object):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected