| 117 | } |
| 118 | |
| 119 | static 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 | |
| 139 | static void WriteColorToIntensity(char*& p, const char* src, const char* dest) |
| 140 | { |
no outgoing calls
no test coverage detected