wined3d: Clamp texcoord output between 0 and 1.
This commit is contained in:
parent
e9de563e41
commit
8068fc3b9c
|
@ -640,7 +640,7 @@ void pshader_hw_texcoord(SHADER_OPCODE_ARG* arg) {
|
|||
pshader_get_write_mask(dst, tmp);
|
||||
if (hex_version != D3DPS_VERSION(1,4)) {
|
||||
DWORD reg = dst & D3DSP_REGNUM_MASK;
|
||||
shader_addline(buffer, "MOV T%lu%s, fragment.texcoord[%lu];\n", reg, tmp, reg);
|
||||
shader_addline(buffer, "MOV_SAT T%lu%s, fragment.texcoord[%lu];\n", reg, tmp, reg);
|
||||
} else {
|
||||
DWORD reg1 = dst & D3DSP_REGNUM_MASK;
|
||||
DWORD reg2 = src[0] & D3DSP_REGNUM_MASK;
|
||||
|
|
|
@ -1245,7 +1245,7 @@ void pshader_glsl_texcoord(SHADER_OPCODE_ARG* arg) {
|
|||
|
||||
if (hex_version != D3DPS_VERSION(1,4)) {
|
||||
DWORD reg = arg->dst & D3DSP_REGNUM_MASK;
|
||||
shader_addline(buffer, "%s = gl_TexCoord[%lu];\n", tmpReg, reg);
|
||||
shader_addline(buffer, "%s = clamp(gl_TexCoord[%lu], 0.0, 1.0);\n", tmpReg, reg);
|
||||
} else {
|
||||
DWORD reg2 = arg->src[0] & D3DSP_REGNUM_MASK;
|
||||
shader_addline(buffer, "%s = gl_TexCoord[%lu]%s;\n", tmpStr, reg2, tmpMask);
|
||||
|
|
Loading…
Reference in New Issue