Skip to content

Commit

Permalink
[game] fixed missing plants texture
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Dec 31, 2024
1 parent 442c52e commit 2f3393e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<img align="center" padding="2" src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/data/textures/banner.bmp"/>

<p>Spartan Engine is one of the most advanced one-man game engines out there, pushing the limits of real-time solutions. What started as a portfolio project has evolved into a cutting-edge platform for developers to explore, learn, and contribute. This isn't an engine for the average user, it's designed for advanced research and experimentation, ideal for industry veterans looking to experiment, not to build a game (yet). With a thriving Discord community of over 440 members, including industry veterans, and contribution perks that you won't believe when you see, it's one of the most unique projects you'll ever come across.</p>
<p>Spartan Engine is one of the most advanced one-man game engines out there, pushing the limits of real-time approaches. What started as a portfolio project has evolved into a cutting-edge project for developers to explore, learn, and contribute. This isn't an engine for the average user, it's designed for advanced research and experimentation, ideal for industry veterans looking to experiment, not to build a game (yet). With a thriving Discord community of over 440 members, including industry veterans, and contribution perks that you won't believe when you see, it's one of the most unique projects you'll ever come across.</p>

- <img align="left" width="32" src="https://i.pinimg.com/736x/99/65/5e/99655e9fe24eb0a7ea38de683cedb735.jpg"/>For occasional updates regarding the project's development, you can follow me on <a href="https://twitter.com/panoskarabelas1?ref_src=twsrc%5Etfw">X</a>.

Expand Down
File renamed without changes.
8 changes: 5 additions & 3 deletions runtime/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,14 +657,16 @@ namespace Spartan
Renderable* renderable = child->GetComponent<Renderable>().get();
renderable->SetFlag(RenderableFlags::CastsShadows, false); // cheaper and screen space shadows are enough

// tweak material
Material* material = renderable->GetMaterial();
// create material as the model doesn't do it
shared_ptr<Material> material = make_shared<Material>();
material->SetResourceFilePath("project\\terrain\\vegetation_plant_1\\ormbunke" + string(EXTENSION_MATERIAL));
material->SetColor(Color::standard_white);
material->SetTexture(MaterialTextureType::Color, "project\\terrain\\vegetation_plant_1\\ormbunke.png");
material->SetProperty(MaterialProperty::SubsurfaceScattering, 0.0f);
material->SetProperty(MaterialProperty::VertexAnimateWind, 1.0f);
material->SetProperty(MaterialProperty::WorldSpaceHeight, renderable->GetBoundingBox(BoundingBoxType::Transformed).GetSize().y);
material->SetProperty(MaterialProperty::CullMode, static_cast<float>(RHI_CullMode::None));
renderable->SetMaterial(material);

// generate instances
vector<Matrix> instances;
Expand All @@ -678,7 +680,7 @@ namespace Spartan

void create_sponza()
{
create_camera(Vector3(19.2692f, 2.65f, 0.1677), Vector3(-18.0f, -90.0f, 0.0f));
create_camera(Vector3(19.2692f, 2.65f, 0.1677f), Vector3(-18.0f, -90.0f, 0.0f));
create_sun(LightIntensity::black_hole, false);
create_music("project\\music\\jake_chudnow_olive.mp3");

Expand Down
2 changes: 1 addition & 1 deletion runtime/Rendering/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace Spartan
SetResolutionOutput(width, height, false);

// set the render resolution to something smaller than the output resolution
// this is done because FSR 2 is not good at doing TAA if the render resolution is the same as the output resolution
// this is done because FSR is not good at doing TAA if the render resolution is the same as the output resolution
SetResolutionRender(1920, 1080, false);

// the resolution/size of the editor's viewport, this is overridden by the editor based on the actual viewport size
Expand Down
5 changes: 2 additions & 3 deletions runtime/Rendering/Renderer_Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "pch.h"
#include "Window.h"
#include "Renderer.h"
#include "../Geometry/geometrygenerator.h"
#include "../Core/geometry_generator.h"
#include "../World/Components/Light.h"
#include "../Resource/ResourceCache.h"
#include "../RHI/RHI_Texture.h"
Expand All @@ -37,7 +37,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef _MSC_VER
#include "../RHI/RHI_FidelityFX.h"
#endif

//========================================

//= NAMESPACES ===============
Expand Down Expand Up @@ -150,7 +149,7 @@ namespace Spartan
// anisotropic
{
// compute mip bias for enhanced texture detail in upsampling, applicable when output resolution is higher than render resolution
// this adjustment, beneficial even without FSR 2, ensures textures remain detailed at higher output resolutions by applying a negative bias
// this adjustment, beneficial even without FSR, ensures textures remain detailed at higher output resolutions by applying a negative bias
float mip_bias_new = 0.0f;
if (GetResolutionOutput().x > GetResolutionRender().x)
{
Expand Down

0 comments on commit 2f3393e

Please sign in to comment.