Problem with TexCoords Generated on Android
Posted: Wed Oct 02, 2024 5:25 pm
While doing my daily tests with the 64-bit stuff, I just realized that the texture positions are completely off on Android when the TexCoords is set to Generated, both in 32-bit and 64-bit. Didn't we already fix that? Or maybe I'm confusing it with something else, I don't know.
Anyway, here's what it looks in preview and PC mode:
Here's the example:
Anyway, here's what it looks in preview and PC mode:
- First row has the TexCoords Generated
- Second row has the TexCoords ModelDefined
- Then from left to right, the TextureWrapMode is Mirror, Tile and Clamp
Here's the example:
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2" AndroidPackageName="com.mydomain.onrender">
<OnRender>
<Repeat Name="repeat" Count="6">
<OnIteration>
<ZExpression>
<Expression>
<![CDATA[int i = repeat.Iteration;
transform.Translate.X = -2.5+(i % 3)*2.5;
transform.Translate.Y = 1.5-(i / 3)*3;
switch(i) {
case 0: @UseMaterial(MAterial:MaterialGeneratedMirror); break;
case 1: @UseMaterial(MAterial:MaterialGeneratedTile); break;
case 2: @UseMaterial(MAterial:MaterialGeneratedClamp); break;
case 3: @UseMaterial(MAterial:MaterialModelDefinedMirror); break;
case 4: @UseMaterial(MAterial:MaterialModelDefinedTile); break;
case 5: @UseMaterial(MAterial:MaterialModelDefinedClamp); break;
}]]>
</Expression>
</ZExpression>
<RenderTransformGroup Name="transform" Translate="2.5 -1.5 0">
<Children>
<RenderTransform Rotate="0.1 0.1 0"/>
<RenderMesh Mesh="CubeMesh"/>
</Children>
</RenderTransformGroup>
</OnIteration>
</Repeat>
</OnRender>
<Content>
<Mesh Name="CubeMesh">
<Producers>
<MeshBox/>
</Producers>
</Mesh>
<Bitmap Name="Bitmap1">
<Producers>
<BitmapCells RandomSeed="63"/>
</Producers>
</Bitmap>
<Material Name="MaterialGeneratedMirror">
<Textures>
<MaterialTexture Texture="Bitmap1"/>
</Textures>
</Material>
<Material Name="MaterialGeneratedTile">
<Textures>
<MaterialTexture Texture="Bitmap1" TextureWrapMode="1"/>
</Textures>
</Material>
<Material Name="MaterialGeneratedClamp">
<Textures>
<MaterialTexture Texture="Bitmap1" TextureWrapMode="2"/>
</Textures>
</Material>
<Material Name="MaterialModelDefinedMirror">
<Textures>
<MaterialTexture Texture="Bitmap1" TexCoords="1"/>
</Textures>
</Material>
<Material Name="MaterialModelDefinedTile">
<Textures>
<MaterialTexture Texture="Bitmap1" TextureWrapMode="1" TexCoords="1"/>
</Textures>
</Material>
<Material Name="MaterialModelDefinedClamp">
<Textures>
<MaterialTexture Texture="Bitmap1" TextureWrapMode="2" TexCoords="1"/>
</Textures>
</Material>
</Content>
</ZApplication>