Forum > DirectX

Problems with texture

(1/2) > >>

Ehh. Direct3D isn't popular on this forum, but I'd try to ask my question. I have weird problem. I have old project from 2006 year, I need to modernize, i.e. port to new framework. Project itself works properly, that proves, that problem isn't with my computer. And this old project allows me to port it via just copy-pasting parts of old code to new framework. But when everything related to Direct3D was ported, problems with textures started. OpenGL works properly with the same textures, i.e. problem isn't with textures themselves.

Symptoms: when texture is enabled, it looks like it's downsampled to 1x1 one. I.e. red-blue checker board texture looks like solid pink color.

In most cases it means some problems with mipmaps. But this problems should be solved via changing filtering. And it doesn't help. Right texture "pitch" and no access violations suggest, that size and format of texture are right ones.

I tried everything. All filtering options, all texture options, all auto mipmap generation options, all rendering states, that could affect textures - nothing helps. Debugging shows, that all necessary parts of code are called. In old project there two set of options - anisotropic and no anisotropic. And both work properly. I tried them both in new project. No success.  What can be wrong?

P.S. I can't post my code here. Project is complex, full working code is big and posting some parts of it is pointless.


--- Quote from: Mr.Madguy on September 16, 2021, 08:39:36 am ---Symptoms: when texture is enabled, it looks like it's downsampled to 1x1 one. I.e. red-blue checker board texture looks like solid pink color.

--- End quote ---
Эта не та самая проблема о которой вы говорите? Пробовали работать с текстурой 1x1? Точнее, если ваша текстура 512x512, то работать как 1/512x1/512.
И, возможно какие-то проблемы связаны с версией DX (я не изучал DX, потому не знаю).
Yandex translate:
Is this not the same problem that you are talking about? Have you tried working with a 1x1 texture? More precisely, if your texture is 512x512, then it will work as 1/512x1/512.
And perhaps some problems are related to the DX version (I haven't studied DX, so I don't know).

I don't fully understand, what you mean. I suspected, that something might be wrong with texture coordinates. I.e., yea, my texture is 512x512 and first it seemed, like 0..1 texture coordinates were used directly instead of (0..1)x512 ones. I tested this case exaclty via making checker board texture. If it would be just blue or just red - it would show, that only one (0, 0) texel is used. But texture was solid pink!

Well, the only practical route route is to make a minimal app. Then maybe people can test and see if they notice something.

I don't know @$!$ about directx, but I have done some opengl, but my initial hunches were in your initial message (the filtering bits specially)

What do you use in the way of headers, DX version etc ? Did you start with certain examples? (clootie?)

I will see, what I can do, but later. I can't provide whole framework. Initial source - is my old app. And it works properly. Headers could be updated, but I'm not 100% sure. Nothing special. Everything else works perfectly. Except textures. Only problem, I can guess for now - some alignments problems, I've already experienced in some other places. When float values aren't aligned properly, they provide some weird values, like close to 0 values instead of big ones. Problem is - I exclude possible causes one by one, but nothing helps or even affects result somehow, so I would know, that I move towards right direction.

What I ask for now - is some initial guess.


[0] Message Index

[#] Next page

Go to full version