wined3d: Optimize P8 fragment shader.

This commit is contained in:
Roderick Colenbrander 2007-10-12 13:34:43 +02:00 committed by Alexandre Julliard
parent 7be8a646a7
commit b4678b7b10
1 changed files with 1 additions and 2 deletions

View File

@ -1980,8 +1980,7 @@ const char *fragment_palette_conversion =
"TEMP index;\n" "TEMP index;\n"
"PARAM constants = { 0.996, 0.00195, 0, 0 };\n" /* { 255/256, 0.5/255*255/256, 0, 0 } */ "PARAM constants = { 0.996, 0.00195, 0, 0 };\n" /* { 255/256, 0.5/255*255/256, 0, 0 } */
"TEX index.x, fragment.texcoord[0], texture[0], 2D;\n" /* store the red-component of the current pixel */ "TEX index.x, fragment.texcoord[0], texture[0], 2D;\n" /* store the red-component of the current pixel */
"MUL index.x, index.x, constants.x;\n" /* Scale the index by 255/256 */ "MAD index.x, index.x, constants.x, constants.y;\n" /* Scale the index by 255/256 and add a bias of '0.5' in order to sample in the middle */
"ADD index.x, index.x, constants.y;\n" /* Add a bias of '0.5' in order to sample in the middle */
"TEX result.color, index, texture[1], 1D;\n" /* use the red-component as a index in the palette to get the final color */ "TEX result.color, index, texture[1], 1D;\n" /* use the red-component as a index in the palette to get the final color */
"END"; "END";