Hot answers tagged

4

Actually every face of your mesh has UV coordinates through which UV mapping works. Let take an example of cube. Cube has 6 faces and every face has 4 coordinates. That means a Cube must have 24 coordinates for UV mapping. Now second part is to map coordinates with texture. Let's take an example of a square texture image having 6 different color boxes ( ...


3

context.clearRect() has a method signature of: context.clearRect(x, y, width, height) In your code, however, you are passing the height and width in the incorrect positions. Changing your call to context.clearRect(0, 0, canvas.width, canvas.height) fixes the issue. MDN clearRect() documentation.


3

There are two possibilities I can come up with that don't involve ordinary planar reflection. The first is to perform screen-space reflection, which is fairly cheap and works for any manner of surface. However, it will be prone to artifacts, and of course it will not be able to reflect objects that are not visible from the regular point of view. The other ...


2

Unity's built-in frustum and occlusion culling features work on a per-renderer level. They'll disable the rendering of whole objects that can't be seen, but they don't select individual triangles to cull out of a single mesh. In both your examples above, the full mesh will be processed by the GPU, because at least part of it is visible. The extra vertices ...


1

This technique is called MRT'S or Multiple Render Targets, and employs the use of additional Framebuffers. Why is this used? Because when wanting to achieve certain screen space effects, whether it is screen space lighting or ambient occlusion, it is quite efficient to store certain scene parameters as textures. Imagine a scene with hundreds of lights ...


1

I just received an answer from the Unity Answers forum. It pointed out that I should've tried to disable the mipmaps on the sprites. After disabling them everything worked flawlessly.


1

Create your mipmapped texture as a rendertarget. Then grab the surfaces of each Mip level you want to render to like this: D3DXCreateTexture( device, width, height, numMips, D3DUSAGE_RENDERTARGET, texFormat, D3DPOOL_DEFAULT, &texture ); texture->GetSurfaceLevel( 0, &mipLevel0 ); texture->GetSurfaceLevel( 1, &mipLevel1 ); ...



Only top voted, non community-wiki answers of a minimum length are eligible