|
is possible to tile within a texture atlas? In other words If I have a small brick texture inside a larger texture atlas. Is there a way to only tile the brick part across the mesh.
(comments are locked)
|
|
I have found that it is indeed possible to tile textures in a texture atlas by modifying the shader. In your pixel output function where the text2D() sampler function is called change your IN.uv_MainTex (or what ever your main texture uv variable is called) to: so the entire line will look like this instead of you will have to set offset as a variable that is present in the editor by declaring it in the properties section of your HLSL code Sure, if you wrap it manually it's possible ;) Haven't thought of wrapping the UVs in the fragment shader.
Feb 07 '12 at 07:13 PM
Bunny83
Would this code work on iOS? And if so, would it cause any performance hit?
Mar 09 '12 at 11:56 PM
eem
I guess it should work. The overhead is marginal. Well like every fragment-shader the load depends on how much of this object is visible on the screen, but the operations aren't really heavy.
Mar 10 '12 at 01:53 AM
Bunny83
What kind of variable is "offset"? A Vector?
Mar 31 '12 at 07:46 PM
Acheron
Would this approach mean that there would need to be one material for each part of the texture? If so then surely there is no benefit to even using atlases right because each material is batched separately... Where else does the
Apr 16 '12 at 04:18 PM
numberkruncher
(comments are locked)
|
