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

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

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

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

Сообщества

Настроить S2

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



Пишет nancygold ([info]nancygold)
@ 2021-10-16 18:28:00


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

9000 segfaults later
Finally fixed the issue with painting in perspective projection.

The perspective projection code was correct all this time, but I had an bug in the code shared with orthogonal projection painting. The bug doesn't affect orthogonal projection, since all screen pixel vectors are parallel, but gets nasty in the perspective projection. Bug itself came out because I don't use the homogeneous matrices, so "translation" part of the linear equation is moved out, and at one point I forgot to add these x,y,z related to the objects center, resulting in projection points being slightly skewed. Guess I should refactor my code and move all matrix mult + translation instances into a separate method, so such nonsense wont ever happen again.



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


(Анонимно)
2021-10-16 22:14 (ссылка)
what is it on the picture, a dick?

(Ответить)