# sftrabbit

less info
reputation
27
bio website sixfoottallrabbit.co.uk location England, United Kingdom age 23 member for 2 years, 8 months seen Nov 29 at 13:45 profile views 33

# 34 Actions

 Sep11 comment do games use multiple threads to play music? Some games will, some games won't. I know I've noticed more often than not that when a game freezes the music just stutters. Aug27 comment Game Trailer Reference other Games Trademark law varies per country but generally says that it's fine to use a trademark to identify products as those of the proprietor as long as you aren't attempting to confuse or deceive anybody. To be safe, you can place a ™ character next to the names and state at some point in your trailer "Pokémon is a registered trademark of Nintendo Co., Ltd.", for example. Of course, your safest bet is to speak to a lawyer in your country. Aug25 comment Why don't we use the whole color depth for normal maps? @danijar It's because the values in the normal vector can range from -1 to +1. If -1 maps to 0, and +1 maps to 255, then 0 maps to 128. So `(0, 0, 1)` maps to `(128, 128, 255)`. Aug24 comment Why don't we use the whole color depth for normal maps? @danijar The full color depth may very well be used by a surface. It would be a very, very bumpy surface. It's just that almost all realistic surfaces are almost flat. Yes, those harsh values are not commonly used in normal maps, but if you took them away, you wouldn't be able to represent every set of normals. Aug24 comment Why don't we use the whole color depth for normal maps? @danijar What do you mean by blank? There's no such thing as a blank normal. A normal is always pointing in some direction. When the normal is pointing directly away from the surface (i.e. all normals in a flat surface), you get the color `(128, 128, 255)`, which is the light blue you're probably referring to. It's half way between full blue `(0, 0, 255)` and white `(255, 255, 255)`. See the corners of this image for an example. Aug24 awarded Editor Aug24 comment Why is it possible to encounter a texture coordinate greater than 1 or less than 0 @sepideh Of course. OpenGL uses whatever values you give it. If you give it values in the range 0 to 1, you will never get anything else. Aug24 revised Why don't we use the whole color depth for normal maps? added 106 characters in body Aug24 answered Why don't we use the whole color depth for normal maps? Aug24 comment Why is it possible to encounter a texture coordinate greater than 1 or less than 0 @sepideh What does "not a run-time possible event" mean? It's perfectly fine to change your code in the comment to have `glTexCoord2f(0, 2);` for example. This has a very specific well-defined meaning in both code and when the program is running. If you see this, the programmer has intentionally done it because it gives the result they want. Aug22 comment Move a player in the opposite direction they are looking @thedeadlybutter If you have a camera direction vector (x,y,z), the opposite direction is (-x, -y, -z). Aug22 comment Move a player in the opposite direction they are looking Is it a first person game? Aug22 awarded Yearling Aug22 answered Can't get indices with VBO working Aug21 comment Can't get indices with VBO working `vboBufferId = indicesBuffer;` - is that really supposed to be `vboBufferId`? Not something like `indicesBufferId`? Aug18 answered How would one draw many objects using the same VBO Aug18 comment OpenGL additive blending not working as expected I'm quite curious why you expect additive blending of red colors to go to yellow and white. I think it would help to see your thought process. Is it because you see white as what you get when you add all color together, and you see yellow as halfway between red and white? You need red, green, and blue added together to end up with white - not just red. Also, yellow is not a lighter red. A lighter red is a pinkish color. Yellow is in fact what you get if you mix red and green light together. Jul30 answered How do I position a 2D camera in OpenGL? Jul30 comment How do I position a 2D camera in OpenGL? @Elfayer You're misunderstanding `glLookAt`. It is for looking at a particular point in the world. You are making it look at point (0, 0, -1) which is always the point next to the corner of your map. It is not a direction (and if it were, it'd be the wrong direction). It doesn't matter where the camera is moved to, it will always look towards that point. The problem here is that you don't want to look at a particular point all the time, you want to look in a particular direction, so you should be using `glRotate`. You want to make your camera look down the y-axis. Jul30 awarded Commentator