Tag Info

New answers tagged

0

I made some changes for your CombineTextures method, public static Texture2D CombineTexture(GameObject obj, Texture2D background, Texture2D TodrawLogo) { int width = TodrawLogo.width; int height = TodrawLogo.height; int backWidth = background.width; int backHeight = background.height; // bottom right corner int startX = backWidth - ...


1

If your testTextureArray[i] is pointing to the same texture, you should have the same performance, but if not, then you are just hitting a design restriction of SpriteBatch. Most implems of SpriteBatch I'm aware of (at least, XNA, SharpDX, Paradox, DirectXTk... though, don't know for sure about MonoGame...) are trying to batch draws with the same ...


0

You can easily achieve that effect by using a Second Camera. Assuming that your Main Camera has Depth -1, add a second camera with Depth 0. Doing this will make the Second Camera render after the first. You can then apply a specific layer Layer to your watermark object and then configure your Second Camera (Culling Mask property) to render only the ...


3

Here are two approaches that I've used before: The approach I prefer is to create an indirection map: Render the UV coordinates themselves to a texture Iterate the raw pixels of the 3D view which need to be updated. Splat into the model texture for each UV pixel The other approach I've had success with is un-projecting and raytracing Invert your ...


0

To answer your first question, yes it's quite possible to load an ETC2 texture on any OpenGL ES 3.0 device. In fact, it's required by the standard. In order to do so, you replace the glTexImage2D function call with glCompressedTexImage2D. For more details, read the documentation. Currently there aren't that many texture compression tools that support ETC2. ...


0

There are several ways to achieve this, presumable you are not using Canvas but rather the DOM for your Isometric grid? If so, read on. Method Draw your Images at x10 the highest resolution you display them at, e.g. (1200x1200 for an image being displayed at 120x120). Vector (SVG) would be another choice, but fine detail is an issue for them, and, ...


1

Yes, lightmaps are textures. Lightmaps are a record of the lighting value for a surface at a particular point, and the way we represent "surface data for a particular point" in modern 3D graphics is with textures. Unity's lightmapping implementation uses Beast. The default lightmap atlas size limit is 1024x1024. Terrain, per the documentation, allows you to ...


0

To use Multiple Render Targets you need to use pixel shaders to tell the GPU where to send each color values. layout(location = 0) out vec4 my_first_FBO_color_buffer; layout(location = 1) out vec4 my_second_FBO_color_buffer; void main() { my_first_FBO_color_buffer = vec4(0, 1, 0, 1); my_second_FBO_color_buffer = vec4(1, 0, 1, 1); } See What is the ...


3

If the only difference between the quads is their physical size in window coordinates ("one is bigger than the other on-screen"), and all other things (shader, textures, et cetera) are equal, then the only significant difference in the pipeline will be that the rasterizer must fill more fragments for the quad that is larger on-screen. This means that if the ...


1

This question is a bit broad and there really isn't a clear cut path in making textures as there are many different uses for textures (UI textures, UV model textures, seamless textures, etc) all depending on what you're making it for. There are a few common denominators though so I'll go over those. Determine Texture Attributes Based on how your texture is ...


0

Simply use the SpriteBatch.Draw overload which allows you to specify the destination rectangle: public override void Draw(Microsoft.Xna.Framework.GameTime gameTime) { spriteBatch.Begin(SpriteSortMode.Deferred); spriteBatch.Draw( texture: texture, destinationRectangle: destinationRectangle, sourceRectangle: null, ...


2

The OpenGL documentation specifies that OpenGL uses the magnification filter. The texture magnification function is used when the pixel being textured maps to an area less than or equal to one texture element. https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexParameter.xml I couldn't find any such documentation for Direct3D so if someone can ...


0

Simply drawing the texture to a smaller quad will scale it down automatically for you; there's no rule stating that the dimensions of the quad you draw a texture to have to be the same as the dimensions of the texture. In your specific case, you can take a 2100x1480 texture and draw a 164x115 quad using it, and the MinFilter you specify in your sampler ...


0

I'm not sure I understand the question correctly, but if you are asking only about how to draw the texture with a different resolution than the original, there is no need to change the texture itself. XNA provides several overloads of SpriteBatch.Draw() method . Some take destination rectangle as the second parameter and allow you to specify the area in ...


1

The path you are giving assetManager should start from the assets folder of your project. So the path should just be: "Textures/map/oldParchment.jpg" This is the same for all assets loaded with assetManager. Compare your code to the tutorial for loading assets.



Top 50 recent answers are included