MCPcopy Create free account
hub / github.com/crownengine/crown / encode

Method encode

src/resource/shader_resource.cpp:1014–1023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1012 }
1013
1014 u32 encode() const
1015 {
1016 u32 state = 0;
1017 state |= _filter_min != SamplerFilter::COUNT ? _bgfx_sampler_filter_min_map[_filter_min] : 0;
1018 state |= _filter_mag != SamplerFilter::COUNT ? _bgfx_sampler_filter_mag_map[_filter_mag] : 0;
1019 state |= _wrap_u != SamplerWrap::COUNT ? _bgfx_sampler_wrap_u_map[_wrap_u] : 0;
1020 state |= _wrap_v != SamplerWrap::COUNT ? _bgfx_sampler_wrap_v_map[_wrap_v] : 0;
1021 state |= _wrap_w != SamplerWrap::COUNT ? _bgfx_sampler_wrap_w_map[_wrap_w] : 0;
1022 return state;
1023 }
1024 };
1025
1026 static const char *CROWN_SAMPLER_STAGE_MARKER = "CROWN_SAMPLER_STAGE";

Callers 2

compile_variantMethod · 0.45
compile_bgfx_shaderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected