Tag Info

New answers tagged

0

This problem may be related to mipmapping. The pixels along the edge are being mapped to a much more copressed LOD than the rest of the sphere, so the entire map is actually being compressed into that line. You may try putting in a tex2Dlod call in the shader and forcing the LOD to 0: return tex2Dlod(TextureSampler, float4(u, v, 0, 0)); Explanation and ...


0

No, Pincushion distortion is not actually the inverse of Barrel distortion. (Proof below) This paper seems to be shooting for exactly what you want: http://sprg.massey.ac.nz/pdfs/2003_IVCNZ_408.pdf (Formulas inside) Proof as promised: By contradiction for simplicity. Extracting the relevant fact about Barrel (and/or Pincushion) distortion: (2): We ...


0

The problem is that obj files contain vertex data in parts:pos,tex,normal and indices in them point to each of these parts individually. In OpenGL you need to combine those parts into one data object - vertex. And have your indices point to vertices, not their parts. My code (scala, but should be ok) val vertexListB = new RList[vec3]()//output positions ...


3

So you're not using a modelling program- thus you'll have to provide the cube/texture information yourself from code. Let's start out simple with one textured triangle. VertexPositionTextures contains Vertex (location of points in space) and texture (where does that point match to a point on an image). Keep in mind that the location for the texture is on a ...


3

Yes, it can. But certain devices will suffer. For example, iOS PVRTC texture compression doesn't work without square textures. I think Unity makes them square, so you end up with your textures taking up a bunch more RAM to accommodate PVRTC. See Unity Documentation: 2D Textures for more details.



Top 50 recent answers are included