Tag Info

New answers tagged

0

The problem is that L.Direction vector is not normalized, so the dot product "max(dot(v, toEye)" is calculating |v|*cos Θ instead of cos Θ, which is not what we want. So normalizing it on CPU side solves the problem. Thank you @snake5 for helping me on chat with it.


0

You can use the parametric equation as marked by Krom. To understand why we used this formula you have to understand what the equation is. This equation is derived from the Parametric equation of circle. Considering the circle is drawn with the center on the origin (O) as shown in the diagram below If we take a point "p" on the circumference of the ...


1

It looks like you are first rendering the buffered image with bilinear interpolation and the result is later stretched with nearest neighbor filtering. It's hard to say without seeing the rest of the rendering code. When I copied your code and used it to fill the background of a JFrame, I got either large solid color quads or fully smooth image depending ...


1

Most likely it is antialiasing the image, in an attempt to avoid looking pixelated. If you have a Graphics2D called g2, then you can modify the settings: g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); The abstract Graphics class does not have this method, but the Graphics object you have ...


1

What you want is a curvilinear perspective projection matrix to correct for the perspective projection distortion. aka barrel or pincushion projection: http://en.wikipedia.org/wiki/Curvilinear_perspective Basically, you distort the image with a projection that is the opposite of the distortion you don't want so it all comes out straight in the end. ...


3

it's trivial, you can do it yourself. Assuming your sprites have alpha value 0 in unused areas, you can do the following (in pseudocode): pixels_out = pixels for y in pixels.height() for x in pixels.width() if pixels(x,y).alpha == 0, neighbour_in_sprite = false for y2 in [-1,0,1] for x2 in [-1,0,1] ...


1

Yes, there are many. Game design is just like any art form, and minimalism can be done extremely well. Here's one example that comes to mind: http://superhotgame.com/ They make use of contrast (red vs. white) and slow motion (glass/people shattering) to get their cool factor.


4

Ok, given the wireframe view, it is clear that your problem is T-junctions. Remove them and the artifacts will go away. If you provide information on how you get/generate the meshes, you could get help on how to remove them as well :)


0

I suppose mobiles do not have dedicated Graphics cards (they have integrated GPUs) , so they utilize the RAM available on the device. To measure, you can try to allocate memory for textures until you run out of memory in order find an approximate limit on the VRAM available.


0

Technically, that's a gap, not an overlap. An overlap would not result in the background colour. So, two of the vertices that are supposed to be in an identical position, are not. If you can't combine the meshes, then make sure that the values are exactly the same (all bits equal). That means being very careful of what values you store in you vertex ...



Top 50 recent answers are included