MCPcopy Create free account
hub / github.com/dolphin-emu/dolphin / WriteZ8Encoder

Function WriteZ8Encoder

Source/Core/VideoCommon/TextureConversionShader.cpp:462–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462static void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
463{
464 WriteSwizzler(p, GX_CTF_Z8M, ApiType);
465
466 WRITE(p, " float depth;\n");
467
468 WriteSampleColor(p, "r", "depth", 0, ApiType, true);
469 WRITE(p, "ocol0.b = frac(depth * %s);\n", multiplier);
470
471 WriteSampleColor(p, "r", "depth", 1, ApiType, true);
472 WRITE(p, "ocol0.g = frac(depth * %s);\n", multiplier);
473
474 WriteSampleColor(p, "r", "depth", 2, ApiType, true);
475 WRITE(p, "ocol0.r = frac(depth * %s);\n", multiplier);
476
477 WriteSampleColor(p, "r", "depth", 3, ApiType, true);
478 WRITE(p, "ocol0.a = frac(depth * %s);\n", multiplier);
479
480 WriteEncoderEnd(p);
481}
482
483static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
484{

Callers 1

GenerateEncodingShaderFunction · 0.85

Calls 3

WriteSwizzlerFunction · 0.85
WriteSampleColorFunction · 0.85
WriteEncoderEndFunction · 0.85

Tested by

no test coverage detected