textures

iPhone - OpenGL ES 1.1 - Alpha Blend make texture wrong color

本小妞迷上赌 提交于 2020-01-23 16:48:08
问题 I'm newbie in OpenGL ES 1.1 for iPhone. Today, I tried to draw png texture on black background (the texture includes the alpha chanel) but the result is diference from source png file. The Result on iPhone & Simulator: Turn the light off: It's should be (Brighter & more blur): Source Texture file: This is the source code I use: //Setup: glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glAlphaFunc(GL_GREATER,0.01); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LIGHTING); glEnable

iPhone - OpenGL ES 1.1 - Alpha Blend make texture wrong color

China☆狼群 提交于 2020-01-23 16:46:20
问题 I'm newbie in OpenGL ES 1.1 for iPhone. Today, I tried to draw png texture on black background (the texture includes the alpha chanel) but the result is diference from source png file. The Result on iPhone & Simulator: Turn the light off: It's should be (Brighter & more blur): Source Texture file: This is the source code I use: //Setup: glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glAlphaFunc(GL_GREATER,0.01); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LIGHTING); glEnable

iPhone - OpenGL ES 1.1 - Alpha Blend make texture wrong color

痴心易碎 提交于 2020-01-23 16:46:06
问题 I'm newbie in OpenGL ES 1.1 for iPhone. Today, I tried to draw png texture on black background (the texture includes the alpha chanel) but the result is diference from source png file. The Result on iPhone & Simulator: Turn the light off: It's should be (Brighter & more blur): Source Texture file: This is the source code I use: //Setup: glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glAlphaFunc(GL_GREATER,0.01); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LIGHTING); glEnable

Super blurry textures - XNA

女生的网名这么多〃 提交于 2020-01-23 02:44:38
问题 I seem to be getting really blurry textures when I look at my textures up close. I am creating a minecraft-like terrain thing and I would like the textures to be pixelated - like it is made rather than XNA try to smooth it out for me. Here is how it appears: http://s1100.photobucket.com/albums/g420/darestium/?action=view&current=bluryminecraftterrain.png Any suggestions would be much appeciated. 回答1: It's not related to anti-aliasing... it's related to how the hardware samples the texels in

The different addressing modes of CUDA textures

旧街凉风 提交于 2020-01-22 07:30:56
问题 I am using a CUDA texture in border addressing mode ( cudaAddressModeBorder ). I am reading texture coordinates using tex2D<float>() . When the texture coordinates fall outside the texture, tex2D<float>() returns 0 . How can I change this returned border value from 0 to something else? I could check the texture coordinate manually and set the border value myself. I was wondering if there was CUDA API where I can set such a border value. 回答1: As mentioned by sgarizvi, CUDA supports only four,

OpenGL ES 2.0 texture not showing on some device

浪子不回头ぞ 提交于 2020-01-21 02:28:09
问题 I found a 3D graphics framework for Android called Rajawali and I am learning how to use it. I followed the most basic tutorial which is rendering a shpere object with a 1024x512 size jpg image for the texture. It worked fine on Galaxy Nexus, but it didn't work on the Galaxy Player GB70. When I say it didn't work, I mean that the object appears but the texture is not rendered. Eventually, I changed some parameters that I use for the Rajawali framework when creating textures and got it to work

Issue with transparent texture on 3D primitive, XNA 4.0

為{幸葍}努か 提交于 2020-01-21 02:28:00
问题 I need to draw a large set of cubes, all with (possibly) unique textures on each side. Some of the textures also have parts of transparency. The cubes that are behind ones with transparent textures should show through the transparent texture. However, it seems that the order in which I draw the cubes decides if the transparency works or not, which is something I want to avoid. Look here: cubeEffect.CurrentTechnique = cubeEffect.Techniques["Textured"]; Block[] cubes = new Block[4]; cubes[0] =

How do I tell frag-shader which texture (of many previously loaded textures) to use per vertex of an external generated 3D file?

╄→尐↘猪︶ㄣ 提交于 2020-01-17 08:27:27
问题 I'm trying to figure out the best way to load a textured 3D model into my webGL application but I'm having some trouble with it. My 3D models have more than 1 texture and I don't know how to tell the shader which texture to use per vertex as this info doesn't seem to be included into the 3D files I looked into so far. I'll give an example: I have modeled a wooden chair with a leather seat/cushion in Blender. Which format should I export the chair to make it easy and efficient to extract: -

How to change texture format to RGBA4444 for Sprite Atlas created in assets.xassets

孤街浪徒 提交于 2020-01-17 03:01:29
问题 So this is my first app and I am stuck and for almost a week I can't find a solution. I've created a lot of animations for different characters and found out that my game' memory usage is about 200 mb. Before I didn't worry about this because, as many beginners I thought that after I'll compress my png textures this size will decrease also. But that didn't happen. So I started to search what I can do about it and found out that changing the texture format from default RGBA8888 to RGBA4444 can

XNA Textured primitives are see-through

我只是一个虾纸丫 提交于 2020-01-16 19:23:09
问题 I'm having a problem with primitives on XNA. As you can see in the link, http://imgur.com/12UTd2s, some of the textured walls are see-through and some aren't. Can someone explain why this happens and help me come up with a solution? Here's the see through wall declaration: testWall.Add(new VertexPositionNormalTexture(new Vector3(x2, 0, z2), new Vector3(1, 0, 0), new Vector2(0,0))); testWall.Add(new VertexPositionNormalTexture(new Vector3(x2, 0, z2 - 50), new Vector3(1, 0, 0), new Vector2(1,0)