texture

Vulkan texture rendering on multiple meshes

匿名 (未验证) 提交于 2019-12-03 08:56:10
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am in the middle of rendering different textures on multiple meshes of a model, but I do not have much clues about the procedures. Someone suggested for each mesh, create its own descriptor sets and call vkCmdBindDescriptorSets() and vkCmdDrawIndexed() for rendering like this: // Pipeline with descriptor set layout that matches the shared descriptor sets vkCmdBindPipeline(...pipelines.mesh...); ... // Mesh A vkCmdBindDescriptorSets(...&meshA.descriptorSet... ); vkCmdDrawIndexed(...); // Mesh B vkCmdBindDescriptorSets(...&meshB

Mapping Wavefront .obj texture vertex on OpenGL

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: An artist gave me all 3D models for me exporting to .obj and .mtl in order that I can render it using OpenGL. But I can't figure out why the texture vertex are greater than 1 and sometimes negative. Take a look at this example: (...) vn -0.000717425 0.00106739 -0.00991695 vn 3.49779e-09 -5.22866e-09 -0.01 vn -0.00142294 0.00211706 -0.00966919 vn -0.00831486 -0.00555545 0 vt 5.82424 -20.091 vt 6.97527 -20.1873 vt 5.81848 -20.1618 vt -7.48189 8.29159 (...) He sent me all textures on TGA format, which I am loading it correctly, but I am not

Reasonable texture sizes in android

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to develop an app that uses opengl on android, and ideally make it run on any phone as old as the original droid (or at least any phone that has OpenGL ES 2.0 support). Currently, I'm using a 2048x2048 ETC1 texture compression. It works fine on the Droid X I'm testing it on, but I currently don't have an original droid to test it on, and I can't find much data on this topic either. I know the G1 didn't do well with textures bigger than 512x512, and the droid seems to do fine with images as large as 1024x1024, but what

Multi-textured Point Sprites in OpenGL ES2.0 on iOS?

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to make a multi-textured point sprite for an iphone application using OpenGL ES 2.0. I can't find any examples of this on web, and it doesn't seem to be working. Is there some built-in limitation where gl_PointCoord can't be used on multiple textures when using GL_POINTS mode for point sprites? uniform sampler2D tex ; uniform sampler2D blur_tex ; vec4 texPixel = texture2D ( tex , gl_PointCoord ); vec4 blurPixel = texture2D ( blur_tex , gl_PointCoord ); I'm sure I am passing in the textures properly, as I can do multi

Best way to handle texture loading and access across multiple classes in XNA?

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: So I have a simple XNA project going on. Basically the question I have is how to handle texture loading and making sure there is proper access to those textures from other classes? For example, every tutorial I've seen, as well as what I can tell from the actual logic of XNA, you're supposed to load textures in the LoadContent() method. But let's say I have another class, Level , that needs its own unique set of textures, and within that I create an instance of my Player object, which also needs its own texture, and of course

Adding video as Texture in three.js

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on this example of Three.js: http://threejs.org/examples/#canvas_geometry_panorama_fisheye In this example, instead of using 6 images, I am using 5 images and one video as a texture (The video format is .ogv). I have edited the above example as follows to achieve what I desire: video = document.createElement('video'); video.autoplay = true; video.src = "textures/videos/Row1Col1.ogv"; var videoTexture = new THREE.Texture(video); videoTexture.needsUpdate = true; var materials = [ videoTexture, // right loadTexture( 'textures/cube

DirectX Image texture quad displays underlying controls color where it is transparent

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to draw a texture on texture as show in the image below. Yellow circle Image: Green circle Image: As shown in the above image of penguins, i'm trying to render another image as texture which is shown by green and yellow circles. The image is transparent where purple is shown. Purple is color of the underlying control on which the texture is drawn. The order of rendering is: 1. render penguins 2. Render green circle 3. render yellow circle 4. render green circle Now I'm not sure as to why i would be seeing the purple for

White edges appearing at edge of cube

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I render a cube and texture it I end up with white edges along the cube. I've checked the vertex and texture coordinates and they look fine to me. My texture is a power of 2. It is a texture map containing 4x4 textures in which each texture is 16x16 pixels. Does anyone have any suggestions? 回答1: I guess you are experiencing texture bleeding. You can solve it by either using GL_CLAMP on your textures or adjusting slightly your UV coordinates to 0.0005 and 0.0095 (for instance) instead of 0 and 1 to compensate for the texture sampling

How to draw line and font without D3DX9 in DirectX 9?

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I saw that D3DX9 is not recommended by Microsoft and not shipped with Windows SDK. I would like to adopt. I'm missing my line drawing utility. How can I replace ID3DXLine and ID3DXFont in "new" DirectX9? 回答1: Generally, lines and fonts are sprites. ID3DXLine and ID3DXFont use ID3DXSprite interface under the hood. (Of course, there are other options too, but sprite approach is the most widely used) Drawing sprites So, firstly, you will need either 3rd party or your own sprite renderer. Typically, development of "bedroom" sprite engine,

Threejs Custom Shader - Screen Tearing

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So to implement a tilemap using Threejs and Brandon Jone's tilemap method ( found here ) I am using a THREE.Plane geometry for each layer, and painting the face with the following custom shaders: Vertex Shader: var tilemapVS = [ "varying vec2 pixelCoord;", "varying vec2 texCoord;", "uniform vec2 mapSize;", "uniform vec2 inverseTileTextureSize;", "uniform float inverseTileSize;", "void main(void) {", " pixelCoord = (uv * mapSize);", " texCoord = pixelCoord * inverseTileTextureSize * inverseTileSize;", " gl_Position = projectionMatrix *