* Note: we're applying the offset and clamping per-vertex.
* Ideally, the offset is applied per-fragment prior to fragment shading.
*/
- v0[2] = CLAMP(v0[2] + zoffset, 0.0f, 1.0f);
- v1[2] = CLAMP(v1[2] + zoffset, 0.0f, 1.0f);
- v2[2] = CLAMP(v2[2] + zoffset, 0.0f, 1.0f);
+ v0[2] = SATURATE(v0[2] + zoffset);
+ v1[2] = SATURATE(v1[2] + zoffset);
+ v2[2] = SATURATE(v2[2] + zoffset);
stage->next->tri( stage->next, header );
}
enum tgsi_semantic name = shader->info.output_semantic_name[slot];
if (clamp_vertex_color &&
(name == TGSI_SEMANTIC_COLOR || name == TGSI_SEMANTIC_BCOLOR)) {
- output[slot][0] = CLAMP(machine->Outputs[slot].xyzw[0].f[j], 0.0f, 1.0f);
- output[slot][1] = CLAMP(machine->Outputs[slot].xyzw[1].f[j], 0.0f, 1.0f);
- output[slot][2] = CLAMP(machine->Outputs[slot].xyzw[2].f[j], 0.0f, 1.0f);
- output[slot][3] = CLAMP(machine->Outputs[slot].xyzw[3].f[j], 0.0f, 1.0f);
+ output[slot][0] = SATURATE(machine->Outputs[slot].xyzw[0].f[j]);
+ output[slot][1] = SATURATE(machine->Outputs[slot].xyzw[1].f[j]);
+ output[slot][2] = SATURATE(machine->Outputs[slot].xyzw[2].f[j]);
+ output[slot][3] = SATURATE(machine->Outputs[slot].xyzw[3].f[j]);
} else {
output[slot][0] = machine->Outputs[slot].xyzw[0].f[j];
output[slot][1] = machine->Outputs[slot].xyzw[1].f[j];