diff --git a/Assets/BuiltIn/Shader/Shadow/GLSL/LibShadow.glsl b/Assets/BuiltIn/Shader/Shadow/GLSL/LibShadow.glsl index bfb467d76..7925427f4 100644 --- a/Assets/BuiltIn/Shader/Shadow/GLSL/LibShadow.glsl +++ b/Assets/BuiltIn/Shader/Shadow/GLSL/LibShadow.glsl @@ -20,7 +20,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = float[3](0.0001, 0.0001, 0.0003); float depth = 0.0; float result = 0.0; @@ -37,7 +37,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo vec3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; vec2 uv = shadowUV.xy; diff --git a/Assets/BuiltIn/Shader/Shadow/HLSL/LibShadow.hlsl b/Assets/BuiltIn/Shader/Shadow/HLSL/LibShadow.hlsl index f8a3ed297..f6324b4be 100644 --- a/Assets/BuiltIn/Shader/Shadow/HLSL/LibShadow.hlsl +++ b/Assets/BuiltIn/Shader/Shadow/HLSL/LibShadow.hlsl @@ -19,8 +19,8 @@ result += COMPARE(float3(rand, id), depth);\ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const float farDistance) { int id = 0; - float visible = 1.0; - float bias = 0.0001; + float visible = 1.0; + const float bias[3] = {0.0001, 0.0001, 0.0004}; float depth = 0.0; float result = 0.0; @@ -37,7 +37,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f float3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; float2 uv = shadowUV.xy; diff --git a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightBakeFS.glsl b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightBakeFS.glsl index ec72f536b..03f0912e6 100644 --- a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightBakeFS.glsl +++ b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightBakeFS.glsl @@ -21,7 +21,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = float[3](0.0001, 0.0001, 0.0003); float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -34,7 +34,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo return 1.0; vec3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; vec2 uv = shadowUV.xy; float size = 1.0/2048.0; vec2 off; diff --git a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightFS.glsl b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightFS.glsl index 022b1b77e..fee453143 100644 --- a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightFS.glsl +++ b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightFS.glsl @@ -21,7 +21,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = float[3](0.0001, 0.0001, 0.0003); float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -34,7 +34,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo return 1.0; vec3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; vec2 uv = shadowUV.xy; float size = 1.0/2048.0; vec2 off; diff --git a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightSSRFS.glsl b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightSSRFS.glsl index 453a8421e..2f25c936b 100644 --- a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightSSRFS.glsl +++ b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/GLSL/SGDirectionalLightSSRFS.glsl @@ -24,7 +24,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = float[3](0.0001, 0.0001, 0.0003); float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -37,7 +37,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo return 1.0; vec3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; vec2 uv = shadowUV.xy; float size = 1.0/2048.0; vec2 off; diff --git a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightBakeFS.hlsl b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightBakeFS.hlsl index b81dfa4ab..366c9cb98 100644 --- a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightBakeFS.hlsl +++ b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightBakeFS.hlsl @@ -31,7 +31,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = {0.0001, 0.0001, 0.0004}; float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -44,7 +44,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f return 1.0; float3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; float2 uv = shadowUV.xy; float size = 1.0/2048; float2 off; diff --git a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightFS.hlsl b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightFS.hlsl index f5ac01109..d42534939 100644 --- a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightFS.hlsl +++ b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightFS.hlsl @@ -31,7 +31,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = {0.0001, 0.0001, 0.0004}; float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -44,7 +44,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f return 1.0; float3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; float2 uv = shadowUV.xy; float size = 1.0/2048; float2 off; diff --git a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightSSRFS.hlsl b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightSSRFS.hlsl index dba6a4c04..bafe593b5 100644 --- a/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightSSRFS.hlsl +++ b/Assets/BuiltIn/Shader/SpecularGlossiness/Lighting/HLSL/SGDirectionalLightSSRFS.hlsl @@ -35,7 +35,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = {0.0001, 0.0001, 0.0004}; float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -48,7 +48,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f return 1.0; float3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; float2 uv = shadowUV.xy; float size = 1.0/2048; float2 off; diff --git a/Assets/BuiltIn/Shader/Toon/GLSL/ToonShadowFS.glsl b/Assets/BuiltIn/Shader/Toon/GLSL/ToonShadowFS.glsl index 8ffd5ab6b..c31f0b418 100644 --- a/Assets/BuiltIn/Shader/Toon/GLSL/ToonShadowFS.glsl +++ b/Assets/BuiltIn/Shader/Toon/GLSL/ToonShadowFS.glsl @@ -33,7 +33,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = float[3](0.0001, 0.0001, 0.0003); float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -46,7 +46,7 @@ float shadow(const vec4 shadowCoord[3], const float shadowDistance[3], const flo return 1.0; vec3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; vec2 uv = shadowUV.xy; float size = 1.0/2048.0; vec2 off; diff --git a/Assets/BuiltIn/Shader/Toon/HLSL/ToonShadowFS.hlsl b/Assets/BuiltIn/Shader/Toon/HLSL/ToonShadowFS.hlsl index 184647db1..452f3bef6 100644 --- a/Assets/BuiltIn/Shader/Toon/HLSL/ToonShadowFS.hlsl +++ b/Assets/BuiltIn/Shader/Toon/HLSL/ToonShadowFS.hlsl @@ -39,7 +39,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f { int id = 0; float visible = 1.0; - float bias = 0.0001; + const float bias[3] = {0.0001, 0.0001, 0.0004}; float depth = 0.0; float result = 0.0; if (farDistance < shadowDistance[0]) @@ -52,7 +52,7 @@ float shadow(const float4 shadowCoord[3], const float shadowDistance[3], const f return 1.0; float3 shadowUV = shadowCoord[id].xyz / shadowCoord[id].w; depth = shadowUV.z; - depth -= bias; + depth -= bias[id]; float2 uv = shadowUV.xy; float size = 1.0/2048; float2 off; diff --git a/Projects/Skylicht/Components/Source/Primitive/CPlane.cpp b/Projects/Skylicht/Components/Source/Primitive/CPlane.cpp new file mode 100644 index 000000000..f26191e5b --- /dev/null +++ b/Projects/Skylicht/Components/Source/Primitive/CPlane.cpp @@ -0,0 +1,53 @@ +/* +!@ +MIT License + +Copyright (c) 2022 Skylicht Technology CO., LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This file is part of the "Skylicht Engine". +https://github.com/skylicht-lab/skylicht-engine +!# +*/ + +#include "pch.h" +#include "CPlane.h" + +namespace Skylicht +{ + ACTIVATOR_REGISTER(CPlane); + + CATEGORY_COMPONENT(CPlane, "Plane", "Renderer/Primitive"); + + CPlane::CPlane() + { + m_type = CPrimiviteData::Plane; + } + + CPlane::~CPlane() + { + + } + + void CPlane::initComponent() + { + CPrimitive::initComponent(); + } + + void CPlane::updateComponent() + { + + } +} \ No newline at end of file diff --git a/Projects/Skylicht/Components/Source/Primitive/CPlane.h b/Projects/Skylicht/Components/Source/Primitive/CPlane.h new file mode 100644 index 000000000..9d80c8a4b --- /dev/null +++ b/Projects/Skylicht/Components/Source/Primitive/CPlane.h @@ -0,0 +1,44 @@ +/* +!@ +MIT License + +Copyright (c) 2022 Skylicht Technology CO., LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This file is part of the "Skylicht Engine". +https://github.com/skylicht-lab/skylicht-engine +!# +*/ + +#pragma once + +#include "CPrimitive.h" + +namespace Skylicht +{ + class CPlane : public CPrimitive + { + public: + CPlane(); + + virtual ~CPlane(); + + virtual void initComponent(); + + virtual void updateComponent(); + + DECLARE_GETTYPENAME(CPlane) + }; +} \ No newline at end of file diff --git a/Projects/Skylicht/Components/Source/Primitive/CPrimitive.h b/Projects/Skylicht/Components/Source/Primitive/CPrimitive.h index 20b2e9987..9db7bde05 100644 --- a/Projects/Skylicht/Components/Source/Primitive/CPrimitive.h +++ b/Projects/Skylicht/Components/Source/Primitive/CPrimitive.h @@ -41,6 +41,7 @@ namespace Skylicht bool m_useCustomMaterial; CMaterial* m_material; + CMaterial* m_customMaterial; std::string m_materialPath; @@ -59,8 +60,15 @@ namespace Skylicht virtual CEntity* spawn(); + public: + CEntity* addPrimitive(const core::vector3df& pos, const core::vector3df& rotDeg, const core::vector3df& scale); + inline void setInstancing(bool b) + { + m_instancing = b; + } + inline CPrimiviteData::EPrimitive getType() { return m_type; diff --git a/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.cpp b/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.cpp index 5af4cb481..544e4ba2b 100644 --- a/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.cpp +++ b/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.cpp @@ -51,6 +51,11 @@ namespace Skylicht initMesh(m, CPrimiviteData::Sphere); m->drop(); } + + // plane + { + initPlane(); + } } CPrimitiveBaseRenderer::~CPrimitiveBaseRenderer() @@ -165,6 +170,55 @@ namespace Skylicht meshBuffer->drop(); } + void CPrimitiveBaseRenderer::initPlane() + { + IVideoDriver* driver = getVideoDriver(); + + IMeshBuffer* meshBuffer = new CMeshBuffer(driver->getVertexDescriptor(EVT_STANDARD), EIT_16BIT); + IIndexBuffer* ib = meshBuffer->getIndexBuffer(); + IVertexBuffer* vb = meshBuffer->getVertexBuffer(); + + video::SColor clr(255, 255, 255, 255); + + vb->reallocate(4); + + video::S3DVertex Vertices[] = { + video::S3DVertex(0, 0, 0, 0, 1, 0, clr, 0, 1), + video::S3DVertex(0, 0, 1, 0, 1, 0, clr, 1, 1), + video::S3DVertex(1, 0, 1, 0, 1, 0, clr, 1, 0), + video::S3DVertex(1, 0, 0, 0, 1, 0, clr, 0, 0), + }; + + for (u32 i = 0; i < 4; ++i) + { + Vertices[i].Pos -= core::vector3df(0.5f, 0.0f, 0.5f); + vb->addVertex(&Vertices[i]); + } + + // Create indices + const u16 u[6] = + { + 0, 1, 2, + 0, 2, 3, + }; + + ib->set_used(6); + + for (u32 i = 0; i < 6; ++i) + ib->setIndex(i, u[i]); + + CMesh* mesh = new CMesh(); + mesh->addMeshBuffer(meshBuffer); + + meshBuffer->recalculateBoundingBox(); + mesh->recalculateBoundingBox(); + mesh->setHardwareMappingHint(EHM_STATIC); + + m_mesh[CPrimiviteData::Plane] = mesh; + + meshBuffer->drop(); + } + void CPrimitiveBaseRenderer::initMesh(IMesh* primitiveMesh, CPrimiviteData::EPrimitive primitive) { CMesh* mesh = new CMesh(); diff --git a/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.h b/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.h index 8e0677f88..ca8f0ca5b 100644 --- a/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.h +++ b/Projects/Skylicht/Components/Source/Primitive/CPrimitiveBaseRenderer.h @@ -44,5 +44,7 @@ namespace Skylicht void initMesh(IMesh* primitiveMesh, CPrimiviteData::EPrimitive primitive); void initCube(); + + void initPlane(); }; } \ No newline at end of file diff --git a/Projects/Skylicht/Components/Source/Primitive/CPrimiviteData.h b/Projects/Skylicht/Components/Source/Primitive/CPrimiviteData.h index 194a0fcb7..e609e9ca6 100644 --- a/Projects/Skylicht/Components/Source/Primitive/CPrimiviteData.h +++ b/Projects/Skylicht/Components/Source/Primitive/CPrimiviteData.h @@ -37,6 +37,7 @@ namespace Skylicht Unknown = 0, Cube, Sphere, + Plane, Count }; diff --git a/Projects/Skylicht/Engine/Source/MeshManager/CMeshManager.cpp b/Projects/Skylicht/Engine/Source/MeshManager/CMeshManager.cpp index 41b2f7b53..3702d6bdd 100644 --- a/Projects/Skylicht/Engine/Source/MeshManager/CMeshManager.cpp +++ b/Projects/Skylicht/Engine/Source/MeshManager/CMeshManager.cpp @@ -243,10 +243,8 @@ namespace Skylicht instancing->applyInstancingForRenderLighting(lightingMeshBuffer, lightingBuffer, transformBuffer); // INSTANCING MESH - // set hardware static buffer renderMeshBuffer->setHardwareMappingHint(EHM_STATIC); - // add mb to mesh for rendering instancingMesh->addMeshBuffer( renderMeshBuffer, mesh->MaterialName[i].c_str(), @@ -255,7 +253,7 @@ namespace Skylicht instancing->applyInstancing(renderMeshBuffer, instancingBuffer, transformBuffer); - // save to render this meshbuffer + // save to render this mesh buffer data->RenderMeshBuffers.push_back(renderMeshBuffer); // apply material diff --git a/Projects/Skylicht/Engine/Source/RenderMesh/CMeshRendererInstancing.cpp b/Projects/Skylicht/Engine/Source/RenderMesh/CMeshRendererInstancing.cpp index db49d4768..c7895adfa 100644 --- a/Projects/Skylicht/Engine/Source/RenderMesh/CMeshRendererInstancing.cpp +++ b/Projects/Skylicht/Engine/Source/RenderMesh/CMeshRendererInstancing.cpp @@ -92,7 +92,6 @@ namespace Skylicht void CMeshRendererInstancing::update(CEntityManager* entityManager) { - // need sort render by material, texture, mesh u32 numEntity = m_meshs.size(); CRenderMeshData** renderData = m_meshs.pointer(); diff --git a/Samples/Instancing/Source/CViewInit.cpp b/Samples/Instancing/Source/CViewInit.cpp index ad5521f46..bae6bb1be 100644 --- a/Samples/Instancing/Source/CViewInit.cpp +++ b/Samples/Instancing/Source/CViewInit.cpp @@ -8,6 +8,7 @@ #include "GridPlane/CGridPlane.h" #include "LOD/CLOD.h" #include "SkyDome/CSkyDome.h" +#include "Primitive/CPlane.h" #include "CRotateComponent.h" CViewInit::CViewInit() : @@ -104,6 +105,10 @@ void CViewInit::initScene() // total object = numObjectInRow * numObjectInRow * (turbine + blade) * numLOD + CGameObject* ground = zone->createEmptyObject(); + CPlane* plane = ground->addComponent(); + plane->setInstancing(true); + int n = numObjectInRow / 2; for (int x = -n; x < n; x++) { @@ -125,6 +130,9 @@ void CViewInit::initScene() indirect->setAmbientColor(ambientColor); windTurbine->addComponent(); + + // rotate the turbine + windTurbine->getTransformEuler()->setRotation(core::vector3df(0.0f, -90.0f, 0.0f)); } @@ -156,7 +164,11 @@ void CViewInit::initScene() rotate->setRotate(0.1f, 0.0f, 0.0f); } + // wind windTurbine->getTransformEuler()->setPosition(core::vector3df(x * space, 0.0f, z * space)); + + // ground + plane->addPrimitive(core::vector3df(x * space, 0.0f, z * space), core::vector3df(), core::vector3df(50.0f, 1.0f, 50.0f)); } } @@ -222,8 +234,8 @@ void CViewInit::onUpdate() // retry download delete m_getFile; m_getFile = NULL; - } - } + } + } #else for (std::string& bundle : listBundles) @@ -236,7 +248,7 @@ void CViewInit::onUpdate() #else fileSystem->addFileArchive(r, false, false); #endif - } +} m_initState = CViewInit::InitScene; #endif