State of Roblox graphics API across all platforms, with percentage deltas since EOY 2017. Updated December 17 2018
| API | Share |
|---|---|
| Direct3D 11+ | 80% (+3%) |
| Direct3D 10.1 | 10% (-1%) |
| Direct3D 10.0 | 8% (-1%) |
| Direct3D 9 | 2% (-1%) |
| diff --git a/src/indexcodec.cpp b/src/indexcodec.cpp | |
| index 4ab92cb..18ccd43 100644 | |
| --- a/src/indexcodec.cpp | |
| +++ b/src/indexcodec.cpp | |
| @@ -7,9 +7,6 @@ | |
| // This work is based on: | |
| // Fabian Giesen. Simple lossless index buffer compression & follow-up. 2013 | |
| // Conor Stokes. Vertex Cache Optimised Index Buffer Compression. 2014 | |
| -namespace meshopt | |
| -{ |
| Using fixed-point encoding for position (14 bits per component) and texture coordinates (12 bits per component), with 32-bit index buffer | |
| and this vertex format: | |
| // 12 bytes | |
| struct PackedVertexOct | |
| { | |
| unsigned short px, py, pz; | |
| unsigned char nu, nv; // octahedron encoded normal, aliases .pw | |
| unsigned short tx, ty; | |
| }; |
| Algorithms used for Cone* preprocess the mesh in some way, then split sequentially into 64-triangle clusters: | |
| ConeBase: optimize mesh for transform cache | |
| ConeSort: split mesh into large planar connected clusters, bin clusters into 6 buckets by cardinal axes, optimize each bucket for transform cache | |
| ConeAcmr: optimize mesh for transform cache, split sequentially into variable length clusters that are relatively planar, sort clusters by avg normal | |
| ConeCash: optimize mesh for transform cache, picking triangles that reduce ACMR but prioritizing those that keep current cluster planar | |
| MaskBase: split sequentially into 64-triangle clusters, store a 64-bit conservative triangle mask for 6 frustums (cube faces) | |
| ManyConeN: split sequentially into 64-triangle clusters, store N (up to 4) cones for each cluster and a cone id per triangle (2 bit) | |
| Note that all Cone* solutions get significantly worse results with 128 or 256 triangle clusters; it doesn't matter much for Mask. | |
| The biggest challenge with Cone* algorithms is t |
| static unsigned char kDecodeBytesGroupShuffle[256][8]; | |
| static unsigned char kDecodeBytesGroupCount[256]; | |
| static bool gDecodeBytesGroupInitialized; | |
| static void decodeBytesGroupBuildTables() | |
| { | |
| if (gDecodeBytesGroupInitialized) | |
| return; | |
| for (int mask = 0; mask < 256; ++mask) |
| // On a Core i7-8650U running at 2.1 GHz, I get the following numbers: | |
| // /mnt/c/work $ g++ -O2 rngshuf.cpp && ./a.out | |
| // shuf 2.195379 s, gen 0.338417 s, shuf-gen 2.731224 s, fwd shuf 2.227119 s | |
| // shuf 2.167099 s, gen 0.122208 s, shuf-gen 2.870520 s, fwd shuf 2.314143 s | |
| // shuf 2.269147 s, gen 0.122214 s, shuf-gen 2.845593 s, fwd shuf 2.367242 s | |
| // shuf 2.270375 s, gen 0.122476 s, shuf-gen 2.867398 s, fwd shuf 2.314249 s | |
| // shuf 2.258742 s, gen 0.120076 s, shuf-gen 2.863602 s, fwd shuf 2.328118 s | |
| // shuf 2.265792 s, gen 0.126285 s, shuf-gen 2.923946 s, fwd shuf 2.356490 s | |
| // shuf 2.264414 s, gen 0.122542 s, shuf-gen 2.880007 s, fwd shuf 2.365302 s |
| LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, | |
| uint32_t firstVertex, uint32_t firstInstance) { | |
| 0F9EEE00 55 push ebp | |
| 0F9EEE01 8B EC mov ebp,esp | |
| 0F9EEE03 51 push ecx | |
| 0F9EEE04 A1 34 E0 A6 0F mov eax,dword ptr [__security_cookie (0FA6E034h)] | |
| 0F9EEE09 33 C5 xor eax,ebp | |
| 0F9EEE0B 89 45 FC mov dword ptr [ebp-4],eax | |
| const VkLayerDispatchTable *disp; |
| void transpose(disjoint Matrix4& target, const disjoint Matrix4& source) | |
| { | |
| for (int i = 0; i < 4; ++i) for (int j = 0; j < 4; ++j) target.m[i][j] = source.m[j][i]; | |
| } | |
| // this is a safe overload | |
| void transpose(Matrix4& target, const Matrix4& source) | |
| { | |
| Matrix4 temp; | |
| for (int i = 0; i < 4; ++i) for (int j = 0; j < 4; ++j) temp.m[i][j] = source.m[j][i]; |
| .SUFFIXES: | |
| MAKEFLAGS+=-r | |
| config=release | |
| BUILD=build/$(config) | |
| SOURCES=$(wildcard src/*.cpp demo/*.c demo/*.cpp) | |
| OBJECTS=$(SOURCES:%=$(BUILD)/%.o) |
| #include "format.h" | |
| namespace fmt { | |
| static void format_bool(std::string& result, bool value) | |
| { | |
| result += value ? "true" : "false"; | |
| } | |
| static void format_char(std::string& result, char value) |