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

Function WriteSampleColor

Source/Core/VideoCommon/TextureConversionShader.cpp:119–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119static void WriteSampleColor(char*& p, const char* colorComp, const char* dest, int xoffset, API_TYPE ApiType, bool depth = false)
120{
121 if (ApiType == API_OPENGL)
122 {
123 WRITE(p, " %s = texture(samp0, float3(uv0 + float2(%d, 0) * sample_offset, 0.0)).%s;\n",
124 dest, xoffset, colorComp
125 );
126 }
127 else
128 {
129 WRITE(p, " %s = Tex0.Sample(samp0, float3(uv0 + float2(%d, 0) * sample_offset, 0.0)).%s;\n",
130 dest, xoffset, colorComp
131 );
132
133 // Handle D3D depth inversion.
134 if (depth)
135 WRITE(p, " %s = 1.0f - %s;\n", dest, dest);
136 }
137}
138
139static void WriteColorToIntensity(char*& p, const char* src, const char* dest)
140{

Callers 15

WriteI8EncoderFunction · 0.85
WriteI4EncoderFunction · 0.85
WriteIA8EncoderFunction · 0.85
WriteIA4EncoderFunction · 0.85
WriteRGB565EncoderFunction · 0.85
WriteRGB5A3EncoderFunction · 0.85
WriteRGBA8EncoderFunction · 0.85
WriteC4EncoderFunction · 0.85
WriteC8EncoderFunction · 0.85
WriteCC4EncoderFunction · 0.85
WriteCC8EncoderFunction · 0.85
WriteZ8EncoderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected