Urho3D Wiki
Edit Page
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 5: Line 5:
   
 
This has two advantages:
 
This has two advantages:
βˆ’
* This helps having many textures as Urho3D and the hardware are limited to a certain texture count (for example 8 or 16). -> Four images for the "cost" of one big image.
+
* This helps having many textures as Urho3D and the hardware are limited to a certain texture count (for example 8 or 16). -> Four images for the "cost" of one.
 
* It's much more convenient to create such an image when using Blender with a technique like this: [[Creating Seamless Procedural Textures with Blender#Bricks as a .22Quad Texture.22|Creating_Seamless_Procedural_Textures_with_Blender#Bricks_as_a_"Quad_Texture"]]
 
* It's much more convenient to create such an image when using Blender with a technique like this: [[Creating Seamless Procedural Textures with Blender#Bricks as a .22Quad Texture.22|Creating_Seamless_Procedural_Textures_with_Blender#Bricks_as_a_"Quad_Texture"]]
 
There is an issue with the mipmaps then using such an image with four textures like displayed above, it results in ugly stripes like these:
 
There is an issue with the mipmaps then using such an image with four textures like displayed above, it results in ugly stripes like these:
Line 15: Line 15:
 
unit="diffuse" has no real meaning here as this image is not only used for diffuse. This just says that this texture is number 0 which is important for the shader as it expects the one texture at "place" 0.
 
unit="diffuse" has no real meaning here as this image is not only used for diffuse. This just says that this texture is number 0 which is important for the shader as it expects the one texture at "place" 0.
   
βˆ’
The technique: "Techniques/quad.xml"
+
The technique: Techniques/quad.xml
 
<technique vs="quad" ps="quad"><br> <pass name="base" /><br> <pass name="litbase" psdefines="AMBIENT" /><br> <pass name="light" depthtest="equal" depthwrite="false" blend="add" /><br> <pass name="prepass" psdefines="PREPASS" /><br> <pass name="material" psdefines="MATERIAL" depthtest="equal" depthwrite="false" /><br> <pass name="deferred" psdefines="DEFERRED" /><br> <pass name="depth" vs="Depth" ps="Depth" /><br> <pass name="shadow" vs="Shadow" ps="Shadow" /><br></technique>
 
<technique vs="quad" ps="quad"><br> <pass name="base" /><br> <pass name="litbase" psdefines="AMBIENT" /><br> <pass name="light" depthtest="equal" depthwrite="false" blend="add" /><br> <pass name="prepass" psdefines="PREPASS" /><br> <pass name="material" psdefines="MATERIAL" depthtest="equal" depthwrite="false" /><br> <pass name="deferred" psdefines="DEFERRED" /><br> <pass name="depth" vs="Depth" ps="Depth" /><br> <pass name="shadow" vs="Shadow" ps="Shadow" /><br></technique>
 
The GLSL shader (based on the terrain shader and parts from LitBase): "Shaders/quad.glsl"
 
The GLSL shader (based on the terrain shader and parts from LitBase): "Shaders/quad.glsl"
Please note that all contributions to the Urho3D Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)