Tag Info

New answers tagged

2

Yes, there are many performance implications to consider even when two objects share the same amount of geometry. Fragments that fail a Z-buffer test will not invoke fragment shaders. The amount of screen-space that the objects occupy will impact performance, as fill-rate is a big deal especially on mobile devices. If you have large triangles that are ...


19

Fundamentally, a core goal in rendering is for each frame displayed on the monitor to present a single, coherent image. There are several different strategies which are, or were, used in order to achieve this. In the following, I mention "vsync". Vsync is the moment at which the monitor begins drawing a new screen image; it's the point at which "vblank" ...


7

The tearing you're talking about is caused by sending data to the monitor at a different rate than it refreshes. If it's a 60 Hz monitor and you're updating at 80 fps, you can get tearing. But that happens and can be fixed with vsync whether you're using a back buffer or not. A back buffer is just used because pushing to the monitor is slow, especially if ...


0

With just a couple of slight rearrangements, you could have: float a = (transform.position.x - Camera.main.transform.position.x) * Main.scale; float b = (transform.position.y - Camera.main.transform.position.y) * Main.scale; onscreen = a > -width && a < GameView.width && b > -height && b < GameView.height; It will ...


1

Keep an "on-screen tiles" collection that you update each time the camera moves and each tile has a reference to the objects in it. This was you only need to update the objects referenced by the tiles that are on screen (or just outside).


-1

Turns out if you want to render only colour, but not texture you have to disable GL_TEXTURE_2D


0

The term you're looking for is Frustum Culling. The problem is this doesn't work too well on individual vertices, because a vertex may be required for a face that is inside the frustum even if the vertex itself isn't. It would be too slow to do that every frame anyway. If neither the mesh or cameras move, or they move predictably so you can precalculate ...


0

you have to create some table, whatever. that will be displayed on the current screen. the values is the question important here. You have to call from where? got it? if you saved the values on SQLite you can make a method that load the top scores. you can read something about multiple input processors to alternate inputs when the user click on score ...


0

Then make something like: enum gameState = { PLAYING = 0, MAINMENU = 1, SCOREBOARD = 2, ... } if(Player.action = PLAYING) { ... do stuff ... } else if(Player.action = MAINMENU) { ... do stuff ... } else if(Player.action = SCOREBOARD) { ... do stuff ... } And about the rendering. It's hard to get around that.


0

This looks like texture wrapping. Click on the texture, open the texture inspector, and set Wrap Mode to Clamp.


0

I've opened the sprite from my Assets folder into photoshop. there was no border. I cut away the offending borders (which made my sprite into a 69x69 instead of 70x70). this seems to have solved it for now. if anyone has a similar issue and finds a better solution, please do post.


1

Swapping the width and height in ShapeRenderer.rect should fix the problem, see the documentation.


2

You need to enable some kind of z-buffering: first render unobstructed units, then buildings, then units that are obstructed (complete or just partially) by buildings and then the ground. If you render them in this order make sure no pixel is overwritten: do not draw over a pixel that has already been drawn, else only the terrain will render. Flush the ...


0

First, the technical stuff that probably goes without saying, but... Camera very low to ground (TPPOV (Tiny Player Point Of View)) Player movement speed scaled down Second, the art stuff, that probably is what you're missing. This translates into... Brand new textures are required that show in fact what something looks like very close up. It has to ...


1

You need to add details to show the scale of the world. In terms of rendering, there's no difference between a tiny person in a normal room and a normal person in a large room. If there's any fog, you should decrease the distance for it so as to make the space look larger. It could also be the height of the ceiling in the room relative to the player height, ...


0

(Based on the comments, the question is really about using BRDFs with area lights.) This is a subtle issue. First of all, there's a difference between what the "color of a light source" means for point lights versus area lights: the color of a point light is an irradiance, while the color of an area light is a radiance. So when using the ...


2

Trying changing setModelBound(new BoundingBox()); to BoundingSphere bs = new BoundingSphere(); bs.setCenter(new Vector3f(32,0,32)); bs.setRadius(1000000); setModelBound(bs); Edit Larethian (short Version) (confirmed working on example code): setModelBound( new BoundingSphere(1000000, new Vector3f(32f, 0f, 32f)) ); As pointed out in the comments ...


1

This sounds to me like a pixel mapping issue. First try varying the resolution to see if the problem appears on other systems and whether a resolution change affects it on the problematic device. When rendering the sprite needs to be mapped to screen space. Let's say its a 400x400 resolution and your drawing 12 blocks horizontally. That means your 32 width ...


0

Maybe they are being culled for being partly outside the view area? Might be worth looking at the code selecting what you render instead of the terrain code. (Or setting near and far plane differently and/or moving the camera further away since it seems the engine is not a custom solution)


0

"Ping pong is a technique to alternately use the output of a given rendering pass as input in the next one." (Example: http://www.seas.upenn.edu/~cis565/fbo.htm)


0

Solved: Incredibly stupid error, figured it out immediately after posting when it had previously stumped me for half an hour. std::vector<double> graphcolordata(graph_data.size()/2*3); for (int i = 0; i < graph_data.size(); i += 3) graphcolordata[i] = 1; should be std::vector graphcolordata(graph_data.size()/2*3); for (int i = 0; i ...


1

"Real-time rendering" is calculated at the instant you ask for your whatever solution to generate the images (different technologies are used to achieve this target). "Off-line" rendering is not necessarily the contrary of "real-time". The term is often used when speaking about configurators and especially web-configurators. Sometimes people also use the ...



Top 50 recent answers are included