Skip to content

Commit

Permalink
Traktor: WorldLayer using "Camera0" to be compatible with scenes úsin…
Browse files Browse the repository at this point in the history
…g split screen.
  • Loading branch information
apistol78 committed Mar 1, 2024
1 parent 9e04ccf commit 12a4946
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 108 deletions.
2 changes: 1 addition & 1 deletion code/Runtime/Engine/WorldLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void WorldLayer::preUpdate(const UpdateInfo& info)
m_scene.consume();

// Get initial camera.
m_cameraEntity = m_scene->getWorld()->getEntity(L"Camera");
m_cameraEntity = m_scene->getWorld()->getEntity(L"Camera0");
}

// Re-create world renderer.
Expand Down
10 changes: 3 additions & 7 deletions code/Weather/Sky/SkyComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,24 @@ class T_DLLCLASS SkyComponent : public world::IEntityComponent
const world::IWorldRenderPass& worldRenderPass
);

render::ITexture* getTexture() const { return m_texture; }

private:
Ref< const render::IVertexLayout > m_vertexLayout;
Ref< render::Buffer > m_vertexBuffer;
Ref< render::Buffer > m_indexBuffer;
render::Primitives m_primitives;
resource::Proxy< render::Shader > m_shaderClouds2D;
resource::Proxy< render::Shader > m_shaderClouds3D;
resource::Proxy< render::Shader > m_shaderCloudsDome;
resource::Proxy< render::Shader > m_shader;
resource::Proxy< render::ITexture > m_texture;
Ref< render::ITexture > m_cloudTextures[2];
Ref< render::ITexture > m_cloudDomeTexture[2];
world::Entity* m_owner = nullptr;
Transform m_transform;
float m_intensity = 1.0f;
bool m_dirty = true;

resource::Proxy< render::Shader > m_shaderCloudsDome;
Ref< render::ITexture > m_cloudDomeTexture[2];

int32_t m_count = 0;
int32_t m_cloudFrame = 0;
bool m_dirty = true;
};

}
3 changes: 1 addition & 2 deletions data/Source/System/Mesh/Shaders/Instance/Cull/Cull.xdi
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ if (ProjectSphere(viewCenter.xyz, radius, znear, P00, P11, aabb))
}
$Output = visible ? 1.0f : 0.0f;
]]>
</script>
</item>
Expand All @@ -293,7 +292,7 @@ $Output = visible ? 1.0f : 0.0f;
<addressW>AdClamp</addressW>
<compare>CfNone</compare>
<mipBias>0</mipBias>
<ignoreMips>false</ignoreMips>
<ignoreMips>true</ignoreMips>
<useAnisotropic>false</useAnisotropic>
</item>
<item type="traktor.render.Mul" version="traktor.render.Node:1">
Expand Down
6 changes: 2 additions & 4 deletions data/Source/System/Platforms/Features/Modules/Runtime.xdi
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,10 @@
<first>DEPLOY_STATIC</first>
<second type="traktor.PropertyStringSet">
<value>
<item>Extern.OpenEXR.lib</item>
<item>Extern.tinyexr.lib</item>
<item>Extern.agg.lib</item>
<item>Extern.detour.lib</item>
<item>Extern.expat.lib</item>
<item>Extern.ilmbase.lib</item>
<item>Extern.jpeg.lib</item>
<item>Extern.flac.lib</item>
<item>Extern.liblzf.lib</item>
Expand Down Expand Up @@ -632,11 +631,10 @@
<first>DEPLOY_STATIC</first>
<second type="traktor.PropertyStringSet">
<value>
<item>Extern.OpenEXR.lib</item>
<item>Extern.tinyexr.lib</item>
<item>Extern.agg.lib</item>
<item>Extern.detour.lib</item>
<item>Extern.expat.lib</item>
<item>Extern.ilmbase.lib</item>
<item>Extern.jpeg.lib</item>
<item>Extern.flac.lib</item>
<item>Extern.liblzf.lib</item>
Expand Down
32 changes: 16 additions & 16 deletions data/Source/System/Terrain/Terrain/Shaders/Templates/Terrain.xdi
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<id>{EAE95A01-9DDB-9F4D-9AED-662D3D8E874D}</id>
<comment/>
<position>
<first>469</first>
<second>298</second>
<first>502</first>
<second>339</second>
</position>
<technique/>
<precisionHint>Undefined</precisionHint>
Expand All @@ -15,16 +15,16 @@
<id>{B243D8E2-D285-C147-9002-C7532C16ADB2}</id>
<comment/>
<position>
<first>211</first>
<second>262</second>
<first>244</first>
<second>303</second>
</position>
</item>
<item type="traktor.render.Transform" version="traktor.render.Node:1">
<id>{2DC80AF2-9ECB-DC41-B8C8-90325B910D85}</id>
<comment/>
<position>
<first>-155</first>
<second>205</second>
<first>-35</first>
<second>244</second>
</position>
</item>
<item type="traktor.render.MulAdd" version="traktor.render.Node:1">
Expand Down Expand Up @@ -159,8 +159,8 @@
<id>{17209A50-5667-6C49-9196-811BDE3EAD67}</id>
<comment/>
<position>
<first>-312</first>
<second>267</second>
<first>-246</first>
<second>293</second>
</position>
<parameterName>World_View</parameterName>
<type>Matrix</type>
Expand All @@ -170,8 +170,8 @@
<id>{73C87553-D473-D747-A948-E76EB7050175}</id>
<comment/>
<position>
<first>-2</first>
<second>325</second>
<first>56</first>
<second>365</second>
</position>
<parameterName>World_Projection</parameterName>
<type>Matrix</type>
Expand Down Expand Up @@ -392,8 +392,8 @@ Generated texture from surface cache.
<id>{533336C9-FA31-DE46-B1DC-F93F8A2A66F1}</id>
<comment/>
<position>
<first>203</first>
<second>172</second>
<first>236</first>
<second>213</second>
</position>
<name>L_ViewPosition</name>
</item>
Expand Down Expand Up @@ -1120,17 +1120,17 @@ $Output = gl_DrawID;
<id>{DCC6C4F8-413E-A040-BA70-ACE74679C628}</id>
<comment/>
<position>
<first>-218</first>
<second>140</second>
<first>-156</first>
<second>120</second>
</position>
<name>L_Elevation</name>
</item>
<item type="traktor.render.Swizzle" version="traktor.render.Node:1">
<id>{7E6EB46D-E906-F948-9FFE-ACC1F5360B10}</id>
<comment/>
<position>
<first>-349</first>
<second>158</second>
<first>-286</first>
<second>138</second>
</position>
<swizzle>y</swizzle>
</item>
Expand Down
Loading

0 comments on commit 12a4946

Please sign in to comment.