NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Novel OpenGL Pixel Shader Dewarping (medium.com)
mmozeiko 14 hours ago [-]
From what I understand from code those unwarps are just doing matrix multiply to get unwraped pixel location? In this case doing these operations directly in fragment shader instead of texture lookup will be faster. Memory bandwidth is not free. But simple ALU like this (just couple FMA's) can easily hide in shadow of texture sampling that happens afterwards. So simply upload those undistortion matrices (mat1 & mat2) as uniforms and do matrix multiply in shader for adjusting texcoords.
monsecchris 14 hours ago [-]
map1 and map2 are the same dimensions as the video image.
mmozeiko 14 hours ago [-]
Ah, I see. Yeah, then the current approach is fine.
zamadatix 15 hours ago [-]
You'll probably catch a bit of flak for pitching this as novel, but I really like how you've packaged it into all into a purpose built application. Those kinds of apps are the most fun to tinker with and feel rare these days :).
ricardobeat 15 hours ago [-]
Results look great. Would be nice to have a performance comparison in numbers against other methods.
aappleby 14 hours ago [-]
Not "novel", I was doing exactly this 10 years ago for a videoconferencing device.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 10:17:31 GMT+0000 (Coordinated Universal Time) with Vercel.