No Game Engine Game Dev: Word Sleuth 028: Text clipping

1 month ago
3

Streamed on 2024-08-08 (https://www.twitch.tv/thediscouragerofhesitancy)

Game Engines are for sissies!

Yesterday I didn't get text clipping done. Spoiler alert ... we didn't today either. However, we did work on it. I assume that an OpenGL expert would have known how to do this simple feature really quick, but I'm not yet an expert and this is how I learn: the hard way.

We worked our way through the math in our Sandbox scene on the CPU until that at least could answer the question correctly. Then we ported what we did to the shader code for the GPU to use. There are some differences that we are working through and assumptions made that are wrong. For example, the gl_FragCoord isn't normalized, so I can remove that. Towards the end I finally got some leverage into the problem. There is still some difference in how the y coordinate is being treated, but we can detect correctly the x-axis bounds.

Here's to nailing it down on Monday.

Loading comments...