Use 6 sided tunnel for better visualization of different texture filters
This commit is contained in:
parent
385b760770
commit
7a118b84b5
5 changed files with 114 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ if %ERRORLEVEL% EQU 0 (
|
|||
xcopy "..\..\data\textures\metalplate_nomips_rgba.ktx" "assets\textures" /Y
|
||||
|
||||
mkdir "assets\models"
|
||||
xcopy "..\..\data\models\tunnel.dae" "assets\models" /Y
|
||||
xcopy "..\..\data\models\tunnel_cylinder.dae" "assets\models" /Y
|
||||
|
||||
mkdir "res\drawable"
|
||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||
|
|
|
|||
110
data/models/tunnel_cylinder.dae
Normal file
110
data/models/tunnel_cylinder.dae
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
|
||||
<asset>
|
||||
<contributor>
|
||||
<author>Blender User</author>
|
||||
<authoring_tool>Blender 2.77.0 commit date:2016-03-18, commit time:12:34, hash:22a2853</authoring_tool>
|
||||
</contributor>
|
||||
<created>2016-09-13T20:41:46</created>
|
||||
<modified>2016-09-13T20:41:46</modified>
|
||||
<unit name="meter" meter="1"/>
|
||||
<up_axis>Z_UP</up_axis>
|
||||
</asset>
|
||||
<library_images/>
|
||||
<library_effects>
|
||||
<effect id="Material_001-effect">
|
||||
<profile_COMMON>
|
||||
<technique sid="common">
|
||||
<phong>
|
||||
<emission>
|
||||
<color sid="emission">0 0 0 1</color>
|
||||
</emission>
|
||||
<ambient>
|
||||
<color sid="ambient">0 0 0 1</color>
|
||||
</ambient>
|
||||
<diffuse>
|
||||
<color sid="diffuse">0.64 0.64 0.64 1</color>
|
||||
</diffuse>
|
||||
<specular>
|
||||
<color sid="specular">0.5 0.5 0.5 1</color>
|
||||
</specular>
|
||||
<shininess>
|
||||
<float sid="shininess">50</float>
|
||||
</shininess>
|
||||
<index_of_refraction>
|
||||
<float sid="index_of_refraction">1</float>
|
||||
</index_of_refraction>
|
||||
</phong>
|
||||
</technique>
|
||||
</profile_COMMON>
|
||||
</effect>
|
||||
</library_effects>
|
||||
<library_materials>
|
||||
<material id="Material_001-material" name="Material_001">
|
||||
<instance_effect url="#Material_001-effect"/>
|
||||
</material>
|
||||
</library_materials>
|
||||
<library_geometries>
|
||||
<geometry id="Cylinder_003-mesh" name="Cylinder.003">
|
||||
<mesh>
|
||||
<source id="Cylinder_003-mesh-positions">
|
||||
<float_array id="Cylinder_003-mesh-positions-array" count="36">0 2 -25 0 2 25 1.732051 1 -25 1.732051 1 25 1.732051 -1 -25 1.732051 -1 25 -1.74846e-7 -2 -25 -1.74846e-7 -2 25 -1.732051 -0.9999998 -25 -1.732051 -0.9999998 25 -1.732051 0.9999998 -25 -1.732051 0.9999998 25</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cylinder_003-mesh-positions-array" count="12" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="Cylinder_003-mesh-normals">
|
||||
<float_array id="Cylinder_003-mesh-normals-array" count="21">0.5 0.8660255 0 1 0 0 0.4999999 -0.8660255 0 -0.5000001 -0.8660254 0 -1 0 0 -0.5000001 0.8660254 0 1 -1.52588e-7 0</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cylinder_003-mesh-normals-array" count="7" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="Cylinder_003-mesh-map-0">
|
||||
<float_array id="Cylinder_003-mesh-map-0-array" count="72">0.4999928 19.25 0.3333439 -18.25 0.5000072 -18.25 0.3333227 19.25 0.1666701 -18.25 0.3333439 -18.25 1.166663 19.25 0.9999928 -18.25 1.16667 -18.25 1.000007 19.25 0.8333227 -18.25 0.9999928 -18.25 0.833344 19.25 0.6666632 -18.25 0.8333227 -18.25 0.6666702 19.25 0.5000072 -18.25 0.6666632 -18.25 0.4999928 19.25 0.3333227 19.25 0.3333439 -18.25 0.3333227 19.25 0.1666631 19.25 0.1666701 -18.25 1.166663 19.25 1.000007 19.25 0.9999928 -18.25 1.000007 19.25 0.833344 19.25 0.8333227 -18.25 0.833344 19.25 0.6666702 19.25 0.6666632 -18.25 0.6666702 19.25 0.4999928 19.25 0.5000072 -18.25</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cylinder_003-mesh-map-0-array" count="36" stride="2">
|
||||
<param name="S" type="float"/>
|
||||
<param name="T" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Cylinder_003-mesh-vertices">
|
||||
<input semantic="POSITION" source="#Cylinder_003-mesh-positions"/>
|
||||
</vertices>
|
||||
<polylist material="Material_001-material" count="12">
|
||||
<input semantic="VERTEX" source="#Cylinder_003-mesh-vertices" offset="0"/>
|
||||
<input semantic="NORMAL" source="#Cylinder_003-mesh-normals" offset="1"/>
|
||||
<input semantic="TEXCOORD" source="#Cylinder_003-mesh-map-0" offset="2" set="0"/>
|
||||
<vcount>3 3 3 3 3 3 3 3 3 3 3 3 </vcount>
|
||||
<p>1 0 0 2 0 1 0 0 2 3 1 3 4 1 4 2 1 5 5 2 6 6 2 7 4 2 8 7 3 9 8 3 10 6 3 11 9 4 12 10 4 13 8 4 14 11 5 15 0 5 16 10 5 17 1 0 18 3 0 19 2 0 20 3 6 21 5 6 22 4 6 23 5 2 24 7 2 25 6 2 26 7 3 27 9 3 28 8 3 29 9 4 30 11 4 31 10 4 32 11 5 33 1 5 34 0 5 35</p>
|
||||
</polylist>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</library_geometries>
|
||||
<library_controllers/>
|
||||
<library_visual_scenes>
|
||||
<visual_scene id="Scene" name="Scene">
|
||||
<node id="Cylinder" name="Cylinder" type="NODE">
|
||||
<matrix sid="transform">-4.37114e-8 0 2 0 0 1 0 0 -1 0 -8.74228e-8 0 0 0 0 1</matrix>
|
||||
<instance_geometry url="#Cylinder_003-mesh" name="Cylinder">
|
||||
<bind_material>
|
||||
<technique_common>
|
||||
<instance_material symbol="Material_001-material" target="#Material_001-material"/>
|
||||
</technique_common>
|
||||
</bind_material>
|
||||
</instance_geometry>
|
||||
</node>
|
||||
</visual_scene>
|
||||
</library_visual_scenes>
|
||||
<scene>
|
||||
<instance_visual_scene url="#Scene"/>
|
||||
</scene>
|
||||
</COLLADA>
|
||||
|
|
@ -31,7 +31,7 @@ out gl_PerVertex
|
|||
|
||||
void main()
|
||||
{
|
||||
outUV = inUV * vec2(50.0, 2.0);
|
||||
outUV = inUV * vec2(2.0, 1.0);
|
||||
outLodBias = ubo.lodBias;
|
||||
outSamplerIndex = ubo.samplerIndex;
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -421,7 +421,7 @@ public:
|
|||
|
||||
void loadAssets()
|
||||
{
|
||||
loadMesh(getAssetPath() + "models/tunnel.dae", &meshes.tunnel, vertexLayout, 1.0f);
|
||||
loadMesh(getAssetPath() + "models/tunnel_cylinder.dae", &meshes.tunnel, vertexLayout, 1.0f);
|
||||
loadTexture(getAssetPath() + "textures/metalplate_nomips_rgba.ktx", VK_FORMAT_R8G8B8A8_UNORM, false);
|
||||
}
|
||||
|
||||
|
|
@ -662,7 +662,7 @@ public:
|
|||
{
|
||||
uboVS.projection = camera.matrices.perspective;
|
||||
uboVS.view = camera.matrices.view;
|
||||
uboVS.model = glm::rotate(glm::mat4(), glm::radians((timer + 45.0f/360.0f) * 360.0f), glm::vec3(1.0f, 0.0f, 0.0f));
|
||||
uboVS.model = glm::rotate(glm::mat4(), glm::radians(timer * 360.0f), glm::vec3(1.0f, 0.0f, 0.0f));
|
||||
uboVS.viewPos = glm::vec4(camera.position, 0.0f) * glm::vec4(-1.0f);
|
||||
VK_CHECK_RESULT(uniformBufferVS.map());
|
||||
memcpy(uniformBufferVS.mapped, &uboVS, sizeof(uboVS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue