Game/작업일지
uniform update 수작업으로 진행 할 때의 고통
newpolaris
2018. 10. 24. 23:27
이것 때문에 머 할 때 마다 시간 날라간다
가장 최근의 문제는, texture register number 문제였다.
location을 미리 얻어놓고 유무 체크 않하고 해당 locatino에 바로 업데이트하는
코드를 테스트했는데
void LightingTechnique::setShadowMap(const GraphicsTexturePtr& texture)
{
m_shader.bindTexture(m_texShadowLoc, texture, 0);
}
void LightingTechnique::setTexWood(const GraphicsTexturePtr& texture)
{
m_shader.bindTexture(m_texWoodLoc, texture, 0);
}
textureWood 를 쓸 땐 shadowmap 결과가 개판이 되고
안쓰면 정상적으로 나왔다.
처음 겪은 현상은 shadow map이 그냥 안되는 거라 lightspace matrix가
잘못 설정되었나 했음;
결국, 저기가 문제이다. 안쓸땐 location이 음수가 나와서 그냥 업데이트안하고 넘어감