diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index 8136759cc7..c039c4b0d0 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -1917,7 +1917,6 @@ void EditorComponent::Update(float dt) // Interactions: { // Interact: - bool interaction_happened = false; if (CheckInput(EditorActions::RAGDOLL_AND_PHYSICS_IMPULSE_TESTER)) { if (wi::input::Press(wi::input::MOUSE_BUTTON_MIDDLE)) @@ -1926,7 +1925,6 @@ void EditorComponent::Update(float dt) wi::physics::RayIntersectionResult result = wi::physics::Intersects(scene, pickRay); if (result.IsValid()) { - interaction_happened = true; XMFLOAT3 impulse; XMStoreFloat3(&impulse, XMVector3Normalize(XMLoadFloat3(&pickRay.direction)) * 20); if (result.humanoid_ragdoll_entity != INVALID_ENTITY) @@ -1957,10 +1955,6 @@ void EditorComponent::Update(float dt) if (wi::input::Down(wi::input::MOUSE_BUTTON_MIDDLE)) { wi::physics::PickDrag(scene, pickRay, physicsDragOp); - if (physicsDragOp.IsValid()) - { - interaction_happened = true; - } } else { @@ -1999,7 +1993,7 @@ void EditorComponent::Update(float dt) } // Other: - if (!interaction_happened && wi::input::Down(wi::input::MOUSE_BUTTON_MIDDLE)) + if (wi::input::Down(wi::input::MOUSE_BUTTON_MIDDLE)) { hovered = wi::scene::Pick(pickRay, wi::enums::FILTER_OBJECT_ALL, ~0u, scene); if (hovered.entity != INVALID_ENTITY) diff --git a/WickedEngine/shaders/windCS.hlsl b/WickedEngine/shaders/windCS.hlsl index 7a324f8af7..4a8ee73057 100644 --- a/WickedEngine/shaders/windCS.hlsl +++ b/WickedEngine/shaders/windCS.hlsl @@ -8,17 +8,16 @@ float compute_wind(float3 position, float time) position += time; const ShaderWind wind = GetWeather().wind; - float randomness_amount = 0; - randomness_amount += noise_gradient_3D(position.xyz); - randomness_amount += noise_gradient_3D(position.xyz / 2.0f); - randomness_amount += noise_gradient_3D(position.xyz / 4.0f); - randomness_amount += noise_gradient_3D(position.xyz / 8.0f); - randomness_amount += noise_gradient_3D(position.xyz / 16.0f); - randomness_amount += noise_gradient_3D(position.xyz / 32.0f); - randomness_amount *= wind.randomness; + position.xyz *= wind.wavesize; - float direction_amount = dot(position.xyz, wind.direction); - float waveoffset = mad(direction_amount, wind.wavesize, randomness_amount); + float waveoffset = 0; + waveoffset += noise_gradient_3D(position.xyz); + waveoffset += noise_gradient_3D(position.xyz / 2.0); + waveoffset += noise_gradient_3D(position.xyz / 4.0); + waveoffset += noise_gradient_3D(position.xyz / 8.0); + waveoffset += noise_gradient_3D(position.xyz / 16.0); + waveoffset += noise_gradient_3D(position.xyz / 32.0); + waveoffset *= wind.randomness; return sin(mad(time, wind.speed, waveoffset)); } diff --git a/WickedEngine/wiTerrain.cpp b/WickedEngine/wiTerrain.cpp index 5874023493..211d6f0c6d 100644 --- a/WickedEngine/wiTerrain.cpp +++ b/WickedEngine/wiTerrain.cpp @@ -785,6 +785,10 @@ namespace wi::terrain grass->width = grass_properties.width; grass->uniformity = grass_properties.uniformity; grass->atlas_rects = grass_properties.atlas_rects; + grass->segmentCount = grass_properties.segmentCount; + grass->billboardCount = grass_properties.billboardCount; + grass->drag = grass_properties.drag; + grass->gravityPower = grass_properties.gravityPower; } MaterialComponent* chunkGrassMaterial = scene->materials.GetComponent(chunk_data.grass_entity); diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 3fbdaa6297..aa21c9f958 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 71; // minor bug fixes, alterations, refactors, updates - const int revision = 681; + const int revision = 682; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);