Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет sadkov ([info]sadkov)
@ 2019-08-23 08:10:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Настроение: amused
Entry tags:gamedev

Texture Mapping Problems
Rendering works fine up until I try to draw anything but a rectangle. Then texture gets distorted in a pattern I remember from 3d rendering. In 3d it was fixed by dividing by Z. But in 2d I don't have Z coordinate. People tell that I still need to introduce one, even virtual, and it would magically fix it, because any u/z and v/z would interpolate linearly in texture space. I still can't imagine how would it fix it and what virtual Z to choice. I tried doing that with z=20.0, but it had no effect, producing the same distorted texture, random Z values for each vertex produce randomly distorted textures. Still Photoshop somehow handles such rect transform correctly.

In other questions they suggest a hack, to get around it, but only for trapezoid:
https://stackoverflow.com/questions/12414708/correct-glsl-affine-texture-mapping



(Добавить комментарий)


(Анонимно)
2019-08-23 08:46 (ссылка)
Do use shaders! Really you going to ignore GPU that have almost all type devices?

(Ответить) (Ветвь дискуссии)


[info]sadkov
2019-08-23 08:54 (ссылка)
GPU can't fix it.

(Ответить) (Уровень выше)


(Анонимно)
2019-08-23 08:53 (ссылка)
Good job nemchy https://3dnews.ru/992918
Say goodbye arab/russian oil.

(Ответить)