DX9: Fixed texture lod.

This commit is contained in:
Branimir Karadžić 2014-07-12 16:41:51 -07:00
parent 3a789c01d4
commit 2db00e3351
3 changed files with 5 additions and 6 deletions

View file

@ -40,8 +40,8 @@ static const uint8_t fs_imgui_image_dx9[342] =
0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........?.......
0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, // ................
0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, // ................
0x03, 0x00, 0x00, 0x0b, 0x80, 0x01, 0x00, 0x60, 0xa0, 0x00, 0x00, 0x24, 0x90, 0x01, 0x00, 0x00, // .......`...$....
0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._......
0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, // ................
0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._......
0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................
0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x01, 0x00, 0x00, // ................
0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ......

View file

@ -12,7 +12,6 @@ SAMPLER2D(u_texColor, 0);
void main()
{
vec4 color = texture2DLod(u_texColor, v_texcoord0, u_imageLod);
gl_FragColor = vec4(color.xyz, 1.0);
vec4 color = texture2DLod(u_texColor, v_texcoord0, u_imageLod);
gl_FragColor = vec4(color.xyz, 1.0);
}

View file

@ -172,7 +172,7 @@ float bgfxShadow2DProj(sampler2DShadow _sampler, vec4 _coord)
# define SAMPLER2D(_name, _reg) uniform sampler2D _name : register(s ## _reg)
# define texture2D(_sampler, _coord) tex2D(_sampler, _coord)
# define texture2DLod(_sampler, _coord, _level) tex2Dlod(_sampler, vec4( (_coord).xy, _level, 0.0) )
# define texture2DLod(_sampler, _coord, _level) tex2Dlod(_sampler, vec4( (_coord).xy, 0.0, _level) )
# define texture2DProj(_sampler, _coord) bgfxTexture2DProj(_sampler, _coord)
# define SAMPLER2DSHADOW(_name, _reg) uniform sampler2DShadow _name : register(s ## _reg)