LLVMValueRef a0_0 = args->facing;
LLVMValueRef a0_0f = LLVMBuildSIToFP(builder, a0_0, float_type, "");
LLVMValueRef zero = lp_build_const_float(gallivm, 0.0);
- LLVMValueRef a0 = vec4f(gallivm, a0_0f, zero, zero, zero, "facing");
+ LLVMValueRef face_val = LLVMBuildFSub(builder, a0_0f,
+ lp_build_const_float(gallivm, 0.5),
+ "");
+ LLVMValueRef a0 = vec4f(gallivm, face_val, zero, zero, zero, "facing");
LLVMValueRef zerovec = vec4f_from_scalar(gallivm, zero, "zero");
store_coef(gallivm, args, slot, a0, zerovec, zerovec);